Hacker News new | ask | show | jobs
by debacle 2848 days ago
Erlang is a very ugly language with brutalist, esoteric syntax. If Erlang adopted a C-like syntax (like nearly every other successfuly language in the world) it would see much wider adoption.
5 comments

C is a very difficult-to-parse language for both humans and computers and its syntax family got popular as much from circumstance as anything else. JavaScript stole Java syntax to court Jaca developers, Java stole C++ syntax to court C++ programmers, C++ stole C syntax to court C programmers and now you have most of the biggest languages of the past 20 years using C syntax because C got big back in the day (and it didn’t get big because of its syntax).

Modern C-family/Algol-family syntax is nice but I certainly welcome trying out other syntax families (in the case of Erlang, Prolog-family).

Erlang syntax indeed seems a little strange. But it's only because today we are accustomed to languages with much more usable/friendly syntax. But when Erlang was born in the 80's the usability wasn't much of a concern yet for programming language designers. Compare popular languages born in the 80's such as C++, Perl, Tcl with the languages born in the 90's such as Python, Ruby, Lua, Haskell. There is a clear pattern. Later languages are much easier to read and write.
Jamming C syntax into everything is how we get eyesores like ReasonML.

A syntax should match the semantics of the language. C style is not the only way to design a programming language and does not fit all domains and semantics.

Brainfuck is esoteric, C++ Template Metaprogramming is pretty esoteric. But once you wrap your head around the pattern matching, the erlang syntax becomes pretty straight forward. I found it interesting because it explicitly didn't look like a C-derivative. The only thing that I think can be a bit cumbersome are specs and types.
Beauty is in the eyes of the beholder.