|
|
|
|
|
by hosh
4764 days ago
|
|
I started working with Erlang for work, on and off, for the past year. I had been working with Ruby for a lot longer. I too, liked the Erlang design, but the syntax is a wreck. It's also true, use something long enough and you get used to it. I've noticed long-time Erlang users tend to have this mystical ability to see the underlying elegance expressed by the Erlang syntax while ignoring the syntactic awkwardness. Elixir brings a lot of good stuff onto the table. I hope the Elixir community incorporates the changes Joe Armstrong suggests. One in particular: f.() makes perfect sense in the Ruby world because everything is an object (we're sending the '()' message to the 'f' object); but things are built out of functions in the Erlang world, and f() makes more sense there. There are no objects or messages to send them, so 'f.()' gets parsed as an extra dot at the end of the name. I think Armstrong's other suggestions follow in the same vein. The point isn't to try to make Elixir have a Ruby-like syntax so much as, having distilled the syntax design principles developed in the Ruby community, apply it in Elixir. |
|
It's just practice. It no longer trips me up, but I still find it klunky and unpleasant after nigh on 6 years of medium-duty usage.
vs. Augh. Yes, I'm cheating perhaps a bit with the (+1), but Erlang syntax has enough other stuff in the way for it to still be fair in the end. For instance, the example Joe gave, where you end up with this long sequence of