Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Erlang is the only object-oriented language.


Clearly you're looking for someone to say

Uh - what?!

So I'll do so.


I think there's something to that, though - "Object-Oriented" has been used to mean many things.

Alan Kay's definition, more or less: "OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. It can be done in Smalltalk and in LISP. There are possibly other systems in which this is possible, but I'm not aware of them."

Erlang has processes with local state communicating via messages, and can do late-binding with pattern matching and hot code loading. It just disposes of classes and other such baggage.


Ok, but there are plenty of things that aren't message passing in Erlang, whereas, say, in Smalltalk, pretty much everything goes through messages, no?


Sure, I'm just saying fogus is making a real point (even though "only" sounds like trolling).


Yeah, I've heard or read Joe Armstrong talking about how Erlang process are like 'objects', but his brief cryptic comment needed something more. And I still disagree with it, because there's tons of interaction in Erlang that is not message passing.


I'm not saying Erlang is 100% OOP. Not at all. Just the good parts. :)


Have you looked at Reia at all?


I've glanced at it, but a language that sells itself as a Ruby-like language for the Erlang VM doesn't appeal to me. I really like Erlang, but don't care for Ruby. (In the procedural/OO/scripting niche, I strongly prefer Lua.)

I'll check it out again, though. If nothing else, it's an example of a real compiler written in Erlang, which is interesting in itself.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: