5 ms·
Interesting read. I'm just aware about the logic class of programming language: imperative (1956, Fortran), functional (1959, Lisp), object-oriented (1972, Smal
by gaiusparx 16y 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?
- nivertech 16y agoErlang 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).
- jules 16y agoErlang 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.
- fogus 16y agoErlang is the only object-oriented language.
- davidw 16y agoClearly you're looking for someone to say Uh - what?! So I'll do so.
- deleted 16y ago[deleted]
- silentbicycle 16y agoI 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.
- davidw 16y agoOk, but there are plenty of things that aren't message passing in Erlang, whereas, say, in Smalltalk, pretty much everything goes through messages, no?
- silentbicycle 16y agoSure, I'm just saying fogus is making a real point (even though "only" sounds like trolling).
- davidw 16y agoYeah, 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.
- silentbicycle 16y agoI'm not saying Erlang is 100% OOP. Not at all. Just the good parts. :)
- davidw 16y agoHave you looked at Reia at all?
- silentbicycle 16y agoI'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.