3 ms·
> As I've seen it said, Erlang is Smalltalk done right. As I see it, It's not, but it’d be a decent platform to build an asynchronous smalltalk on top of. One
by dragonwriter 7y ago
> As I've seen it said, Erlang is Smalltalk done right.
As I see it, It's not, but it’d be a decent platform to build an asynchronous smalltalk on top of. One key thing it is missing is a convenient syntax for defining processes (either via instantiable templates equivalent to “class” in many OOPLs or as singletons equivalent to “object” in Scala) in terms of the message handlers and local state (volatile state of the kind that would be held in the process dictionary and the kind of “transactionally updated” state that, in Erlang, would be carried in function args.)
- yesco 7y agoIsn't that exactly what Erlang's gen_server does or am I missing something?
- regulation_d 7y agoseems like OTP to me
- cuddlecake 7y agoA process is simply a function that runs independent of other functions in the system + a mailbox + a handle + own memory. So the convenient Syntax to define a process is a function declaration. Plus, calling "spawn" to start the process. Of course, as other responders pointed out, there is also OTP, an established framework (not syntax) to define processes with predefined, battle-tested behaviours.
- ProfHewitt 7y agoThe Actor Model attempts to be as general as possible to support direct modeling and efficient implementation of all digital computation. For example, an Actor is not required to have an external mailbox, which is required for communication in Erlang [Armstrong, et. al. 1992]. Requiring an external mailbox is problematical for Actors because the mailbox would itself necessarily be another Actor thereby immediately leading to an infinite regress. Also, requiring the use of external mailboxes can slow requests between Actors because it would always be necessary to first deposit a request in an Actor’s external mailbox so that the request could later be retrieved. That a request is almost always sent and received without ever residing in persistent storage, where it can be left and later retrieved, is an important engineering goal for Actors.