Sven Suska <sven715rt / suska.org> writes:

> Look at the ease with which you can write concurrent programs in Erlang.
> No need to think about locking there -- the language takes care of
> that.

That's because there is no mutable data structure there, so it
sidesteps the issue entirely. That is not possible in languages like
Ruby where such things are abound and shared. Immutable data structure
is an exception, not the rule, in ruby.

Furthermore, you still need to think about locking in Erlang when
several processes are sharing external resources. 

> I think that logic variables would not fit well into current Ruby.
> (But maybe I'm wrong... well, I'd be delighted to have logic variables
> in Ruby... :-) )

What a coincidence. See Austin Ziegler's code in rubytalk:252018 if
you want the single-assignment property of logic variable.

> But I think that these "partially frozen" or "crystallizing" objects
> could be a step towards bringing some of that ease of parallel programming
> into Ruby.

That would be difficult considering ruby is full of global, shared,
mutable objects. Having said that, fortunately there are approaches
that are more suitable for non-functional languages, where the need
for explicit locking is not as jarring as it is now.

YS.