Has Map shorthand syntax in other languages caused you any problems?

Edit: I saw this before the Proposal thread. I voted in there.

The very question of this topic is a leading question. For completeness I’ll answer it first though. Yes, it has caused me problems. I used to know javascript very well 10 years ago, but these days I spend maybe 10% of my time in it. Coworkers use the shorthand syntax, and it forces me to slow down to understand what’s going on.

The real question to be asking here though is whether this belongs in Elixir, regardless of whether it has or has not caused problems in other languages.

Code is read more often than it is written so we should optimize for reading convenience over writing convenience. I don’t recall any time in my 20+ years as a professional programmer when typing speed was my bottleneck in writing quality code. Even if I concede this is a problem for some of you out there, please set up your editor/IDE to give you a shorthand writing syntax, and leave the core language syntax alone.

TL;DR Look to your editor to micro-optimize your ability to write code quickly

6 Likes