4 ms·
I also have the even earlier "Preliminary Ada Reference Manual", from June 1979, which has only 150 pages. At that stage, Ada had already won the DoD competiti
by adrian_b 5y ago
I also have the even earlier "Preliminary Ada Reference Manual", from June 1979, which has only 150 pages.
At that stage, Ada had already won the DoD competition, but until it was published as a military standard a few more features were added and some sections of the specification were rewritten, for increased precision.
In any case, the June 1979 Ada version already included what I consider as the most useful Ada innovation, even if it is just a small detail: allowing underscores inside numbers, for better readability.
It always annoys me when I have to use some programming language or software tool that happens to miss this feature, even now, more than 40 years after it became known that this is a good idea.
- buescher 5y agoUnderscores inside numbers! I had no idea. Yes, it's a very good idea. I bet someone out there hates it though. It's in Python, Javascript, and Java at least now... what others?
- pjmlp 5y agoYou missed C# and C++.
- adrian_b 5y agoWhile C++ 2014 added a digit separator, in my opinion using a single quote instead of an underscore as in Ada and in all the other languages following Ada was an extremely stupid decision. The rationale for this surprising choice was that a number starting with an underscore could be interpreted as an identifier. ??!! Why would anyone want to start a number with an underscore? Underscores are needed only inside long numbers. The syntax should have allowed underscores only inside numbers and there would have been no problems with backward compatibility, as such numbers would have been illegal before. The single quote cannot have been easier for parsing as the new use must not be confused by the parser with character literals, which can appear in the same context. The underscore was first introduced in a programming language by IBM PL/I (in 1964, when it was still named NPL) with the precise purpose of improving the readability of identifiers. Ada has extended this use to also improve the readability of long numbers. Why C++ has chosen a different character, which is normally used for completely different purposes, without having any decent justification for such a baffling decision, I cannot understand.
- WalterBright 5y agoD had underscores in numbers in its first version, and that was inspired by Ada. https://dl.acm.org/doi/abs/10.1145/3386323 https://dl.acm.org/doi/abs/10.1145/3386323 Since D popularized it, many other languages added it. Even C is finally doing it (although using a ' instead of _, which I do not understand the rationale for).
- jamesfinlayson 5y agoInteresting - I remember when underscores in numbers was getting added to modern languages around 10 years ago - I had no idea it harked back to Ada.