Damien Katz, creator of CouchDB, writes about Erlang, error handling, C, Rust, and his experience building databases and search engines.
HN commenters call his Erlang critique accurate, recommend his error-handling article, and link his Lotus Notes formula engine rewrite as a good read.
I write it fully acknowledging that programming language flamewars are pointless, but this article just shows that you don't even have to try hard to create a biased comparison.
Here's the essential difference between Go and Erlang: Go gets most of the things right, Erlang gets way too much wrong.
So what does Go gets right but Erlang doesn't:
* Go is fast. Erlang isn't
* Go has a non-surprising, mainstream syntax. You can pick it up in hours. Erlang - not so much.
* Go has a great, consistent, modern, bug-free standard library. Erlang - not so much.
* Go is good at strings. Erlang - not so much.
* Go has the obvious data structures: structs and hash tables. Erlang - no.
* Go is a general purpose language. Erlang was designed for a specific notion of fault tolerance - one that isn't actually needed or useful for 90% of the software but every program has to pay the costs
* Go has shared memory. Yes, that's a feature. It allows things to go fast. Purity of not sharing state between threads sounds good in theory until you need concurrency and get bitten by the cost of awkwardness of having to copy values between concurrent processes
So sure, if you ignore all the major faults of Erlang (http://damienkatz.net/2008/03/what_sucks_abou.html, http://www.unlimitednovelty.com/2011/07/trouble-with-erlang-or-erlang-is-ghetto.html, http://ferd.ca/an-open-letter-to-the-erlang-beginner-or-onlooker.html, http://sacharya.com/tag/erlang-sucks/) it compares very favorably to Go.
You…
I use the comma-first style in everything (in languages that have this problem) now that I know about it. I was also interested to see it with semicolons in Simon PJ's chapter in Beautiful Code.
I just wish the character was something other than a comma! It looks so wrong in that position.
BTW, your second example should be
var variable
, anotherVariable // preceding comma
, thirdVariable
;
Perl and Python don't have the trailing-comma problem in most contexts, but they do have a similar problem with some other infix operators. For example, I'm still not sure whether I should use it for strings:
var myString = "This string is a bit too long to fit "
+ "comfortably on a single line, so I "
+ "have split it across three lines."
;
The problem with this is that the first line looks like a standalone JS statement. Python requires you to wrap the whole thing in parens, which solves that problem:
readMyString = ( "This string is a bit too long to fit "
+ "comfortably on a single line, so I "
+ "have split it across three lines."
);
The other language besides JavaScript where I find it useful is SQL:
create table text_editors ( name varchar
, latest_version varchar
, list_of_stupid_flaws blob
);
I suspect that this approach would fix most of…
In his personal, excellent talk (as the 1st commenter on Damien Katz's blog post wisely notes), Damien Katz shares and talks about quitting to do a startup when you are not young and single but older and responsible but still have that startup urge on simmer/low.
Laura (his wife) and Damien's share their differing responses/perspectives on what the personal/family risks were in the comments on his blog post below:
http://damienkatz.net/2009/02/couchdb_and_me.html#comments
In the beginning...
"Sell our house, live off the savings and build cool stuff... There were a lot of reasons not just money...
The first was just educational - I had interests in a lot of areas. The first was, distributed systems. I wanted to know more about them. I wanted to know how to build them... It seems crazy but if you're going to go off and pursue a Master's degree - you're going to quit your job, you're going to have to pay your tuition - and there's no income - and the end of it you have a degree. An Education...
It was about more family time. I had a beautiful one-year old and I didn't want to spend all my time at the office, working on somebody else's crap...
I wanted to see what I could do...
And this is the reason why my wife was interested. It would be an interesting story...
No wants to be wrapped up in this consumerist lifestyle, where if you have money you spend it...It was a good thing it forced us to downsize...
I wish I had sort of a vision... It wasn't like that - it was…
It's a 10 year old blog post from the creator of CouchDB who then later declared the project dead despite it already having a vibrant open source community with multiple users and contributors. Then went on to create another project that had a similar name but was a merge of a bunch of other technologies which lead to endless confusion years on after the fact.
http://damienkatz.net/2012/01/the_future_of_couchdb.html
Yes, of course the argument should stand on its own despite the author's other claims or blog posts, so let's review some claims:
> Because Prolog sucks ass for building entire applications.
There have been entire applications written in Prolog. Attacking syntax is is just silly. Had Prolog used statements and not expressions or ; instead of . I doubt we'd would have a seen a lot more or less applications in Prolog.
> But that hasn't deterred Erlang from stealing it's dynamite syntax.
The syntax is consistent. That's the point. It has relatively few syntax and semantic rules. It has strong types and behaves consistently, comparing say, with "this" in Javascript. js has semicolons but it behave inconsistently sometimes. You'd have to explain why {} + [] = 0 for example. Picking on js here since the author used js as an example of a "good" language.
> editing code is much harder than conventional languages.
Have not found this to be true. It is a bit harder. But not much harder and not a show stopper. You can't randomly copy and paste code and reorder…
These are attributes that everyone can, on honest personal judgement, can mistake to possessing themselves to varying degrees. But it might be a useful list to read through when stuck at a problem that is simply not giving way.
Unless we have the chance to learn from and be coached directly by a master, what would be helpful is narratives on how they think and solve problems.
The best I have so far come across in a book is "Coders At Work". https://github.com/aosabook/500lines promises to be another. Rich Hickey did great service by talking pragmatically about the meta aspects of programming through Hammock Driven Development and Simple is not Easy. Dijkstra's and Alan Perlis' writing that has been gaining a resurgence in popularity is also of a similar ilk. http://damienkatz.net/2005/01/formula-engine-rewrite.html also is an intriguing story.
besides it being functional and process orientated, theres lots about erlang syntax, that is just cumbersome, unwieldy and unnecessary, the interested reader is refferred to http://damienkatz.net/2008/03/what_sucks_abou.html. To claim that stability is a facet of the syntax , is questionable given as it would imply that languages like reia http://reia-lang.org/ are less stable, which i would very much doubt. Also in terms of stability ive yet to hear of a jvm based project with 99.999% uptime. You seem to suggest that this is because all of the java programs out there are not written to the same standard, this clearly cant be true. Finally, I wait anxiously for the day that a single jvm can handle as many concurrent processes as a single erlang execution environment. This is all my opinion, but what you say doesnt really make sense to me.