Re:Joe Armstrong About Erlang (interview)
by masklinn on Monday November 29, 2010 @01:14PM
(#1951163)
> Erlang doesn't seem to impose hierarchies at all.
True and not true, if you see Erlang as an object oriented language you still have three hierarchies at least:
1. for a given behavior, should it be packaged as a process or as a function? And if it's a function, in which module does it live? Granted, erlang's modules are "flat" so you don't get much of a hierarchy here.
2. Processes are organized in trees, because to send a message to a process you need a reference to it (its pid). Processes can be opted out of a tree by registering it globally, but that's about it. You could argue it's more of a bush as processes can communicate in a ring or with one another.
3. Supervision trees are most definitely hierarchies.
It seems to me like object-oriented style forces hierarchies onto the problem. It's fine to use hierarchies when it is a part of the problem, but when it's not, it causes all kinds of problems.
Erlang doesn't seem to impose hierarchies at all.