4 ms·
Erlang is pragmatic
- pookleblinky 17y agoStopped reading it after the sentence "Erlang is not a functional programming language." edit: http://james-iry.blogspot.com/2009/05/erlang-is-not-functional.html http://james-iry.blogspot.com/2009/05/erlang-is-not-function... and others seem to agree that "functional" is not the antonym of "practical/pragmatic/useful."
- silentbicycle 17y agoI think you misread his intent -- The point he's making is that Erlang grew organically into its current form by way of continual sculpting during use by its creators, rather than being refined to approach a theoretical ideal. You seem to think this he means this as a slam on functional programming, but I don't think that's the case. Going one further from the linked blog post, is OCaml functional? By Fischer's definition, yes, but I've written very non-functional (ha) code in OCaml. It's a multi-paradigm language, which happens to have very good support for functional programming, but it isn't limited to it. (I've also written very functional code in idiomatic Lua. Is Lua functional, then?) While functional programming techniques don't go against the flow of Erlang, saying it's functional is probably a bit of a stretch - its design doesn't prioritize this the way Haskell's does. (HN favors substantial comments over one-line reactions, btw. "I didn't bother reading this" doesn't add much to the discussion.)
- plinkplonk 17y ago"The point he's making is that Erlang grew organically into its current form by way of continual sculpting during use by its creators rather than being refined to approach a theoretical ideal" This might be an interesting language design methodology. Try to code up something hard (to introduce constraints) and assume you have to build a new langauge to do it. Iow ignore existing languages/libraries etc.
- silentbicycle 17y agoA lot of interesting mini-languages (e.g. make, regular expressions, and yacc) have formed that way.
- chops 17y agoThe point he's making is that Erlang grew organically into its current form by way of continual sculpting during use by its creators I've never really designed a serious language before, aren't almost all languages done this way?
- silentbicycle 17y agoHe's contrasting it to languages that are closely based on a mathematical ideal, such as Haskell (pure functional programming, category theory, etc.) or Prolog (Horn clauses and logic), minimalistic Scheme/Lisps (lambda calculus) or, to a lesser extent, SQL (relational theory, albeit a far from perfect implementation).
- hassy 17y ago> The point he's making is that Erlang grew organically into its current form by way of continual sculpting during use by its creators, rather than being refined to approach a theoretical ideal. Thank you. That is exactly what I meant. Whether Erlang satisfies some definition of "functional" or "OO", or "concurrency-oriented" does not matter. What matters is that it's a kick-ass platform for building scalable distributed fault-tolerant apps. (That said, Erlang is a good introductory language for someone who wants to explore functional programming.)
- RiderOfGiraffes 17y agoThe paper linked to is of much greater value than the blog entry. http://www.cs.chalmers.se/Cs/Grundutb/Kurser/ppxt/HT2007/general/languages/armstrong-erlang_history.pdf http://www.cs.chalmers.se/Cs/Grundutb/Kurser/ppxt/HT2007/gen...
- jhancock 17y agoHere is Joe Armstrong's doctoral thesis. http://www.sics.se/~joe/thesis/armstrong_thesis_2003.pdf http://www.sics.se/~joe/thesis/armstrong_thesis_2003.pdf I find it highly readable.
- Tichy 17y agoThe same point could be made about Java ("we noticed that language feature x lead to a lot of probelms in the field, so we decided to leave it out of Java").
- stcredzero 17y agoAll you need to consider: - Is it useful? - Is it fun? Just OR these two to see if the language has justified its existence.
- charlesju 17y agoHere is something that I have been toying with, please downvote me if you guys think this is out of place: Why do you need so much fault tolerance and concurrency? It seems to me that the regular server would only need to thread a little bit, process incoming requests, and shoot out responses. (this is assuming you're not building MySQL or a heavy duty web server)
- jhancock 17y ago"this is assuming you're not building MySQL or a heavy duty web server" erlang is for building heavy duty web servers. It scales down pretty well too, but there is still a learning curve.
- oomkiller 17y agoLots of people starting to use Erlang needs fault tolerance for high availability, and high concurrency because they need to scale massively. YAWS, one of the more-popular webservers written in Erlang (that has docs, unlike Mochiweb), blows Apache out of the water when it comes to serving many users (http://www.sics.se/~joe/apachevsyaws.html http://www.sics.se/~joe/apachevsyaws.html). Apache can serve about 4,000 parallel sessions on the same hardware YAWS can serve at least 80,000 parallel sessions. This is due to the high level of concurrency that Erlang enables and encourages. Another example is ejabberd, one of the most popular Jabber/XMPP servers. It takes advantage of the high concurrency also, which allows is to process many more connections than Openfire or the C-based jabberd and jabberd2.