Hacker News new | ask | show | jobs
by jmcdiesel 3369 days ago
Can anyone explain why it seems like so many new languages are reinventing things that seemingly have little effect, but they seem to be changing them "just because"

We have comments in code for decades now. // and /* */ are easily the bigest standard, with # coming in second. Why '--' in this language? Why "``" in another language i saw recently?

I cant imagine this gives any real benifit to the coder or the compiler, and it seems to be more difficult because now the IDEs have to be configured for a(nother) new comment type, it has be become muscle memory again, its yet another "common ground" peice of code that requires context switching to change between languages...

I get doing new things with the functional features of a language, im all for trying new things and seeing what works... just seems wierd to have so many ways to comment code... such an insignificant part, why change?

4 comments

> why change?

They didn't. The syntax is explicitly stated to be a mixture of OCaml and Elm. The -- comment syntax is from Elm. Elm in turn got it from Haskell.

It's -- in both Elm and Haskell for comments, so it's not new and part of the heritage of the language.
You may be pleased to hear that ReasonML chose /* */ for its OCaml syntax refresh just for familiarity.
SQL uses '--' for comments.