Erlang have encapsulation more strong than in any OOP language - all you have is server process and messages thrown to it.
Erlang have encapsulation more strong than in any OOP language - all you have is server process and messages thrown to it.
OO without inheritance is still OO. OO with immutability is sill OO. Encapsulation is the heart of OO. Polymorphism is also quite important. Inheritance is a distant third property of OO, but it is one common aspect of OO that is highly over-used. Most OO "best practices" gurus discourage rampant use of inheritance these days and say to prefer composition.
Back to the whole point of this thread, Rich Hickey says specifically NOT to use encapsulation (90% of the time). That would then not be OO. No encapsulation, no OO.
But I do not think it's very useful to say that Erlang is object oriented, since it will confuse a lot of people, since it is not anything like the other "object oriented languages".
http://www.infoq.com/interviews/Erlang-Joe-Armstrong http://www.infoq.com/interviews/johnson-armstrong-oop
I find it useful to instill this kind of confusion in people around me.
"You talk about encapsulation? Look at erlang"
"Polymorphism? Haskel"
"OOP? Javascript, CLOS"
"Static/dynamic typing? Look here - your java code is in fact dynamic, if you're really want to taste real static - look at ML-family or something near"