Hacker News new | ask | show | jobs
by gaiusparx 5766 days ago
Interesting read. I'm just aware about the logic class of programming language: imperative (1956, Fortran), functional (1959, Lisp), object-oriented (1972, Smalltalk), logic (1974, Prolog). Some Erlang syntax is borrowed from Prolog, so is Erlang a logic programming language or functional (I always thought Erlang is functional)? What other language is under logic class?
3 comments

Erlang is a functional language (among other paradigms) but not a logic language. Logic languages are based on relations instead of functions. Datalog and Oz and Mercury are other examples of logic languages.
Erlang is a mixed paradigm language, which borrows from languages like Miranda and Prolog. Initially it was written using Prolog syntax (relations) and VM was implemented in Prolog too. Later it's Prolog syntax was adapted to the current functional style (i.e. functions).
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.