Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is a cool and fun project, but a lot of people in the thread are pretty confused about erlang syntax so I wanted to post this.

erlang's syntax is not some arcane afterthought, it may look strange or even "ugly" to people not familiar with it, but it has been very well thought out and purposeful, every time there is a choice between a beautiful construct that can add confusion, or a less elegant solution that is crystal clear, erlang chooses less elegant every time.

I have been doing javascript since I started programming and still get confused by its object model + prototypal inheritance, the same is true for pretty much every language, python, ruby, c++ etc going back to erlang is a refreshing break.



I'll stick with Damien Katz on this:

   Erlang is based originally on Prolog, a logic programming     
   language that was briefly hot in the 80's. Surely you've 
   seen other languages based on Prolog, right? No? Why not? 
   Because Prolog sucks ass for building entire 
   applications. But that hasn't deterred Erlang from 
   stealing it's dynamite syntax.
cf. http://damienkatz.net/2008/03/what_sucks_abou.html


Until our species gets rather better at quantifying the effect of communication mediums' on cognition I take issue with Mr. Katz's assertion. The semantic meaning of Erlang and prolog code is such that ideas can be expressed rapidly, in my experience. Besides, taste in syntax is like taste in tea: you might prefer a light cup of Earl Grey, I might like mine over-brewed and bitter. Prolog's syntax--and by extension Erlang's--is an acquired taste, perhaps; I like them both.

Tea time!


You of course have a point in that "you can't argue with taste".

However programming languages live and die by the size of their community. Erlang has, by choice of an over-brewed and bitter syntax, drawn itself into a niche much smaller than it deserves. The only chance to escape would be to adapt a more popular taste.

Otherwise it will eventually be obsoleted by a language "as powerful as erlang, but minus the arcane syntax".


I'd like to use that language.


Hi. I created Reia.

Erlang's semantics are so very different from most other languages that having an arcane Prolog-derived syntax is just insult to injury.

In addition to all the conceptual, semantic leaps that Erlang asks you to make, you also have to learn a syntax which is very different from the Algol/C-based languages most people are used to.

I buy the argument that maybe, if you get used to it, Erlang's syntax can be beautiful. But it's still very much a barrier to people who have never used the Prolog language "family" (which as noted earlier includes... Prolog and Erlang).

In my personal experience having used Erlang for some 3 years now, I still find its syntax ugly and obtrusive.


I found I adapted to Erlang's syntax in under a week. I'm far from proficient in Erlang, but it's not an issue of syntax, rather experience.

Erlang syntax is a bit different, and there are even (IMHO) internal inconsistencies, but I didn't find it any more of a roadblock than e.g. python's indentation conventions. Each person is different I guess.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: