There's an awful lot to like about NIM. It has a few issues that would make 
experienced developers hesitant to adopt it. I will list them in order from 
most to least problematic, followed by a brief rationale for each:

  1. Lack of block delimiters such as braces, or begin/end.
  2. Object layout format
  3. Object method calling convention
  4. Missed opportunity to realize Ada's powerful type specification



Programs need structure and containment. There is a reason modern code editors 
have all kinds of visual facilities for emphasizing them. When staring at code, 
it's easy to lose focus or get lost in the sea of code. Without block 
delimiters, you're relying purely on indentation. It also saves little vertical 
space over delimiters; line breaks add vertical separation instead. Python gets 
away with it because most of its programs are quite short. Block delimiters 
have been a fixture in most programming languages since the 60s when displays 
and punched cards were limited to 25 lines or less. If they offered no value, 
they would have gone the way of the dodo early on.

Of all the wonderful ideas to steal from Ada, its object layout formatting is 
the one to leave behind, but Nim went for the wrong bag. The majority of 
object-oriented languages syntactically nest operations and data members inside 
the object declaration. Like block statements, it visually emphasizes the 
concept of containment or encapsulation. Ada, and now Nim, broke this 
well-established convention. Many would-be Ada developers are completely turned 
off by it, complaining it's weird and gross and offers no advantages. 
Unfortunately, Ada is stuck with this unfortunate design due to backward 
compatibility. Hopefully, it's not too late for Nim to change course.

Nim's object method calling convention was also in the bag with Ada's object 
layout formatting. It's equally a big point of contention with many Ada 
developers. Requiring the method's associated object in its list of parameters 
is a grave oversight and belies Nim's minimalist syntax goals. Ironically, Nim 
improved it to conform with the more common convention. While Ada can't undo 
its object layout mistake, it did implement an alternate syntax for its 2012 
release, implying its calling convention wasn't well received. While the issue 
has been largely resolved in Nim, referring to it as syntactic sugar in the 
documentation is a begrudging dismissal of its value. I hope I'm it's a false 
perception.

Finally, breaking into Ada's safe and walking out with the bag containing its 
worst goodies while leaving behind its shimmering crown jewel warrants severe 
punishment, not for the heist, but for its poor appraisal. Ada's type 
specification is by far its best feature, which no other language has managed 
to achieve. The ability to specify constraints, and even static expressions, so 
exquisitely and precisely kept an otherwise overwhelmingly pedantic language 
relevant for several decades. The serves as metadata, providing the compiler 
with the programmer's intent and a beyond-AI level of optimization hints that 
would be otherwise unknown.

I hope it's not too late to change direction on these issues. 

Reply via email to