3 ms·
Erlang is a nice and unique language, but I feel at its core it falls into the object-oriented/message-passing paradigm, very much in the vein of Smalltalk. Co
by colanderman 3y ago
Erlang is a nice and unique language, but I feel at its core it falls into the object-oriented/message-passing paradigm, very much in the vein of Smalltalk. Consider these paragraphs from Smalltalk's Wikipedia entry [1]:
> A Smalltalk object can do exactly three things:
> 1. Hold state (references to other objects).
> 2. Receive a message from itself or another object.
> 3. In the course of processing a message, send messages to itself or another object.
Replace "Smalltalk object" here with "Erlang process" and the description holds.
> Unlike most other languages, Smalltalk objects can be modified while the system is running. Live coding and applying fixes ‘on-the-fly’ is a dominant programming methodology for Smalltalk and is one of the main reasons for its efficiency.
Erlang's famed robustness similarly owes much to its ability to update code in a running program.
[1] https://en.wikipedia.org/wiki/Smalltalk#Object-oriented_programming https://en.wikipedia.org/wiki/Smalltalk#Object-oriented_prog...
- davidw 3y agoJoe Armstrong talked about that in the past, and I can sort of see it if I squint, but at the end of the day, there are a lot of things in Erlang that are not processes, like most of your basic data types, so I'd just say Erlang is good at borrowing, like a lot of practical real world languages are, and in doing so, came up with a niche where it's pretty good. It takes things from the FP world, its syntax from Prolog, and definitely has message passing as an integral part of how you architect a system with it.
- colanderman 3y agoFair point! It definitely is a mishmash of good ideas. I think the message passing / OO aspect stands out to me as most distinct from other languages, even if it's not as pervasive in the language as in Smalltalk.
- tonyarkles 3y agoIt's funny to me. OTP Processes have a ton of similarities to Agents, but from what I recall it sounds like those two things were developed almost entirely independently and it wasn't until way after the fact when people outside of Ericsson started using Erlang that people started noticing and commenting on that.