3 ms·
You'll probably love to read this interview https://www.infoq.com/interviews/johnson-armstrong-oop https://www.infoq.com/interviews/johnson-armstrong-oop I qu
by pmontra 8y ago
You'll probably love to read this interview
https://www.infoq.com/interviews/johnson-armstrong-oop https://www.infoq.com/interviews/johnson-armstrong-oop
I quote from the first answer of Armstrong (Erlang)
> The 3 things that object oriented programming has it's messaging, which is possibly the most important thing. The next thing is isolation and that's what I talked about earlier, that my program shouldn't crash your program, if the 2 things are isolated, then any mistakes I make in my program will not crash your program. [...]
> The third thing you want is polymorphism. Polymorphism is especially regarding messaging, that's just there for the programmer's convenience. It's very nice to have for all objects or all processes or whatever you call them, to have a printMe method - "Go print yourself" and then they print themselves. [...]
> Erlang has got all these things. It's got isolation, it's got polymorphism and it's got pure messaging. From that point of view, we might say it's the only object oriented language [...]
By not crashing the other program he means two programs running inside the same VM. There can be many programs running inside the same BEAM (Erlang's VM) and they can be kept isolated via different supervisors. It's the normal state of that system. Example: what in other languages is a library to make HTTP calls in Erlang (or Elixir) is a separate process that receives messages with the arguments of the calls.