Yohanes Santoso schrieb: >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. > Yes, and in such a language it may still be possible to establish areas where the immutable paradigm rules. >Immutable data structure is an exception, not the rule, in ruby. > > Of course. And I don't think that this could change dramatically. But immutable data structures may become less exotic, when the need for them increases. >Furthermore, you still need to think about locking in Erlang when >several processes are sharing external resources. > > Granted. >What a coincidence. See Austin Ziegler's code in rubytalk:252018 if >you want the single-assignment property of logic variable. > > Thanks for pointing me to it! >>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. > > OK. What do you have in mind? So long, Sven