Not sure of what "spawn" does, but I guess it will be equivalent to: Although Scala implements the concept of actors, I think Erlang provides better support for low-cost concurrency and recovery. On the other hand, running in the JVM is a big plus and with Terracota you can get almost free clustering. [ August 07, 2008: Message edited by: Gabriel Claramunt ]
Doesn't Scala still use Java-style threads? Aren't they kind of expensive to create?
The Erlang book encourages creating lots and lots of processes - to the point that I think having them in the thousands is good.
Has anyone seen any process-creation benchmarks of Erlang vs Scala? I have a funny feeling the JVM can't keep up on process creation... or at least not yet.
Joined: May 26, 2007
Actually,I just found that Scala's event-based actors are threadless. Scala uses a pool of threads to serve all actor requests. If I recall correctly, Erlang does something similar. In event based actors, messages are processed with the "react" keyword instead of "receive", the Actors tutorial explains how to use it Also I found a detailed explanation of what happens behind the curtains in Event-Based Programming without Inversion of Control Seems Scala's actors are almost like Erlang ones [ August 11, 2008: Message edited by: Gabriel Claramunt ]