Live data from Hacker News

Getting started with Erlang: a new way to look at Erlang's syntax

medium.com

11–15 of 15 posts

Re: Getting started with Erlang: a new way to look at Erlang's syntax

#11

I never understood why Erlang syntax has been so commonly maligned. I had no trouble getting through Joe Armstrong's Programming Erlang in less than a week, and the syntax never required any conscious moment to "click," it just flowed right past. The only exception at first was the operator precedence rules inherited from Prolog, but those are memorized quickly. I also didn't have in-depth prior experiences to non-AL…

I think I may be more representative of the camp complaining about erlang's syntax. My background is as a sysadmin without CS training, with only prior experience using ruby, python, and shell scripting.

It took me about four months of hard studying for erlang to click. I think it was due to learning some CS fundamentals (e.g. had never heard of a tuple before, never seen multiple dispatch), learning functional programming fundamentals (had never used a purely functional language before - unless you count bash), and had never looked at prolog. Finally, I was simultaneously exposed to new concepts of concurrency, pattern matching, etc.

I think what happened was that the unusual syntax is the easiest thing to blame for the resulting confusion, because it's the surface layer you engage with.

Re: Getting started with Erlang: a new way to look at Erlang's syntax

#12

I never understood why Erlang syntax has been so commonly maligned. I had no trouble getting through Joe Armstrong's Programming Erlang in less than a week, and the syntax never required any conscious moment to "click," it just flowed right past. The only exception at first was the operator precedence rules inherited from Prolog, but those are memorized quickly. I also didn't have in-depth prior experiences to non-AL…

I think I may be more representative of the camp complaining about erlang's syntax. My background is as a sysadmin without CS training, with only prior experience using ruby, python, and shell scripting. It took me about four months of hard studying for erlang to click. I think it was due to learning some CS fundamentals (e.g. had never heard of a tuple before, never seen multiple dispatch), learning functional progr…

Ah, that would make sense. I already had some knowledge of general computing "culture" before learning Erlang, so I did not stall much on the broader concepts. Erlang is more heterodox, so it's likely the ideas could be an initial obstacle.

Re: Getting started with Erlang: a new way to look at Erlang's syntax

#13
post #5

I never understood why Erlang syntax has been so commonly maligned. I had no trouble getting through Joe Armstrong's Programming Erlang in less than a week, and the syntax never required any conscious moment to "click," it just flowed right past. The only exception at first was the operator precedence rules inherited from Prolog, but those are memorized quickly. I also didn't have in-depth prior experiences to non-AL…

I think that generalizing from your own personal experience is probably a bad idea here. I personally learn syntax very easily probably because I place very little emphasis on syntax and far more on semantics. However I have met people who place a lot of emphasis on syntax. For them the syntax of a language is a large hindrance. I suspect there are people for whom syntax has a large impact on productivity. Especially…

It's much more complex than that. Learning new syntax, for example, is completely different beast than actually using the syntax. Syntax has non-trivial - and rarely understood - influence on code readability and language idioms. Constructs with syntactic support tend to see more usage than the "bare" features - it takes a language as impoverished as JavaScript to convince people that they don't need syntactic sugar to use those features. Language syntax affects tooling to a great extent. And so on.

So, in short: syntax does matter, although in a different way than most people think.

On the other hand, people who are fixated on some syntax should just stop. Writing a couple of lexers/parsers helps here. Knowing different kinds - of flavours - of syntax helps even more. Syntax does matter, but not nearly as much as such people seem to think.

Re: Getting started with Erlang: a new way to look at Erlang's syntax

#14

I never understood why Erlang syntax has been so commonly maligned. I had no trouble getting through Joe Armstrong's Programming Erlang in less than a week, and the syntax never required any conscious moment to "click," it just flowed right past. The only exception at first was the operator precedence rules inherited from Prolog, but those are memorized quickly. I also didn't have in-depth prior experiences to non-AL…

I think I may be more representative of the camp complaining about erlang's syntax. My background is as a sysadmin without CS training, with only prior experience using ruby, python, and shell scripting. It took me about four months of hard studying for erlang to click. I think it was due to learning some CS fundamentals (e.g. had never heard of a tuple before, never seen multiple dispatch), learning functional progr…

> e.g. had never heard of a tuple before

You never encountered tuples in python?

Re: Getting started with Erlang: a new way to look at Erlang's syntax

#15
post #8

Erlang's syntax really is really really easy... its just different enough that it causes fence jumping when switching languages

2nded. IMO, Erlang the language is really really simple and easy and the basics can be learned in a few days, though it helps to have been exposed to Lisp, PROLOG, or various functional languages.

What I find far more challenging is catching up with the myriads of libraries & frameworks that are used to build real applications. Oh, and finding compatible versions of these can also be an unwanted adventure at times.

Post reply on HN