Research Question 1: Is it possible to get Erlang-style process isolation using Scala Actors?
The goal -- I want an isolated Scala Actor (shall we call them Monologuers?) that can't muck around with the state of another Monologuer, except through explicit mailbox messages. Ideally, I'd like to just do this by adding a library, instead of hacking the Scala language, similar to how Actors themselves were introduced into the Scala world.
The answer, doh, seems to be no.
Monologue'ing or Actor isolation in Scala doesn't seem to be possible. But you might be able to simulate something useful by putting together Scala dynamic variables, annotations, the loan pattern, and programmer discipline/coding-patterns/practices in some way. Too bad. A programmer has to remember not to touch or refer to global or lexically shared state while trying to write a Monologuer / isolated Actor... Perhaps the Scala libraries that can parse Scala might help here. hmmm.
I'm just starting Scala, so I'd love to be wrong about this!
Tags:
Share
You need to be a member of My Scala Base to add comments!
Join this Ning Network