5 ms·
Because nobody has mentioned Erlang yet, I should point out that CouchDB, Riak, and RabbitMQ are all written in it. They seem to be holding their own when it co
by pjscott 16y ago
Because nobody has mentioned Erlang yet, I should point out that CouchDB, Riak, and RabbitMQ are all written in it. They seem to be holding their own when it comes to practicality.
Erlang is a functional programming language without so much as a single iteration construct; if you want a loop, you have to use recursion. Variables are immutable, and it communicates via asynchronous messages between lightweight processes.
- tsuraan 16y agoJust some clarifications so that newbies don't get scared away from erlang :) Erlang is a functional programming language without so much as a single iteration construct; if you want a loop, you have to use recursion. To keep it from sounding too terrible, Erlang has all the standard map/foreach/fold functions that every other functional language has; it's all recursion at the bottom, but it's nicely encapsulated. Most data structures follow the conventions of the iteration functions found in the lists module: http://erlang.org/doc/man/lists.html http://erlang.org/doc/man/lists.html Variables are immutable, and it communicates via asynchronous messages between lightweight processes. I don't know if couch, riak, or rabbit use them, but erlang does have the process dictionary, which is a per-"thread" mutable datastore (http://www.erlang.org/course/advanced.html#dict http://www.erlang.org/course/advanced.html#dict). I know that wings3d uses the process dictionary a lot, supposedly for performance reasons. The use of the process dictionary isn't recomended, but it is there when needed. EDIT: corrected an instance of rabbit where I meant erlang
- philwelch 16y agoErlang also has convenient features like list comprehensions and partial definitions of functions to make this stuff easier. And while the process communication stuff is supposedly a distribution/concurrency system, you can treat processes as objects and do message-passing style OOP with a little cleverness.
- iamaleksey 16y agoAlso ejabberd.