5 ms·
Obliged to respond, even if this is from two years ago, as a lot of our work is in Erlang... 1) is completely wrong; Erlang doesn't have anything to do with Pro
by chunkbot 16y ago
Obliged to respond, even if this is from two years ago, as a lot of our work is in Erlang... 1) is completely wrong; Erlang doesn't have anything to do with Prolog, and the syntax is actually pretty straightforward. 2) is for the most part true, though the bigger problem is finding one library that solves your problem (rather than choosing from two or more). 3) is mostly true (there are plenty of Erlang charlatans; try hiring for an Erlang position and see what manner of Erlang programmers you find). 4) is completely false; large (100K to 1M+ SLoC) Erlang codebases are manageable. 5) could be a good point, but might be said about any language; in the end, results speak for themselves. 6) might be a valid concern, but for the most part, Erlang code is behind the web layer, and some other application relays the requests to the back-end.7) is pretty much irrelevant.
At the end of the day, if you're happy with the results you're getting with Erlang (and you can get great results), who cares if the rest of the world thinks Erlang has no fashion sense? Erlang is still beautiful.
- xtho 16y ago"ad 1.)" is completely wrong: From http://www.erlang.org/faq/academic.html http://www.erlang.org/faq/academic.html: 10.3 Where does Erlang syntax come from? Mostly from prolog. Erlang started life as a modified prolog Maybe this means Prolog syntax isn't really that weird?
- silentbicycle 16y agoErlang syntax is derived from Prolog syntax, sure, but with several extra operators and heavy operator overloading. Prolog syntax is cleaner. The ";" vs "." thing is also on Erlang. Prolog has a function to read the next clause (much like Lisp's read parses the next sexp), and Prolog clauses end in ".". The Erlang interpreter seems to have been implemented so it read every alternative for a pattern in one step, so it ended all except the last with ";". ";" is Prolog's "or" operator, "," is "and". Prolog just ends every pattern with ".". That said, you get over those minor syntactic issues pretty quickly, and I'll take a language with ugly syntax but beautiful semantics over one with ugly semantics any day.
- moe 16y agoI'll take a language with ugly syntax but beautiful semantics over one with ugly semantics any day. Sadly the erlang semantics aren't all beautiful either, at least for the things that most people would use it for today. This quote that I picked up on the erlang mailing list was an eye-opener to me (from memory): Erlang wasn't designed to make easy things easy. It was designed to make hard things possible. This explains a lot about the erlang mindset. Things like the obscure syntax or the abhorrent string handling are simply not very high on their priority list. For example, strings weren't used much in the telecom projects that erlang was original conceived for - hence they didn't get much love until recently. Similarly the syntax seemed like a good fit for the problems that erlang was looking to solve, because it makes the expression of very complex, concurrent constructs comparably sane. The problem for us "normals" is that in our codebases we very rarely need that kind of expressive power (and the associated learning curve). We tend to need it in 2-3 critical spots, the remaining 99% is best solved by a general-purpose language that allows for quick iteration. Introducing the behemoth of erlang to a project only for these 2-3 spots very rarely passes a cost/benefit analysis. That's why we hack shoddy, slow and fragile bandaids in our go-to languages, instead of using erlang.
- silentbicycle 16y agoThe string handling is not great* , but the support for pattern matching on atoms and tuples is nonexistent in most languages, and most programmers don't know to hold that against them. * Except for the bit syntax, but that's more for binary data.
- chunkbot 16y agoThis isn't interesting anymore; Erlang and Prolog simply aren't related beyond the most superficial of syntactical rules. http://stackoverflow.com/questions/3542891/erlang-programming-will-learning-prolog-help http://stackoverflow.com/questions/3542891/erlang-programmin...
- jasonwatkinspdx 16y agoErlang was originally a Prolog dialect. To be specific an external dsl for concurrency implemented on top of a Prolog interpreter. The language moved on and dropped some of the defining features of Prolog (such a backtracking), but the syntax still resembles Prolog.
- gtani 16y agoIn erlang's pattern matching syntax, arguments given at run time are matched successively against number and types of formal parameters in each ";" separated clause in a function definition (plus against any guard's specified values). This is similar to the syntax in haskell, F# and ocaml, so it may look weird at the outset but it's not an isolated weirdness, and it quickly becomes a natural way to read code.
- chunkbot 16y agoPlenty of languages were initially prototyped in C, but we don't consider them "based on C" because they kept braces. http://stackoverflow.com/questions/3542891/erlang-programming-will-learning-prolog-help http://stackoverflow.com/questions/3542891/erlang-programmin...
- rvirding 16y agoThe language has very definitely moved on and lost ALL of the defining features of Prolog except for some syntax elements. It only resembles Prolog in a very superficial way, mainly that variables start with a capital letter. The semantics are completely different.
- gtani 16y ago4) I remember seeing somethig that compiled LoC totals for the major erlang projects, and they were very compact repo's. I can't find it right now, but e.g. rabbitMQ core is ~12K, couchdb is 20K incl. javascript (ejabberd is a much bigger repo) http://www.rabbitmq.com/resources/RabbitMQ_Introduction.pdf http://www.rabbitmq.com/resources/RabbitMQ_Introduction.pdf http://en.oreilly.com/mysql2011/public/schedule/detail/17618 http://en.oreilly.com/mysql2011/public/schedule/detail/17618
- gtani 16y agoPS / FWIW / TBH ohloh has higher LoC counts by including tests and utility code, but something funky is goig on with their counts of riak LoC http://www.ohloh.net/p/riak/analyses/latest http://www.ohloh.net/p/riak/analyses/latest