Live data from Hacker News

Ada for the C++ and Java Developer [pdf]

learn.adacore.com

71–72 of 72 posts

Re: Ada for the C++ and Java Developer [pdf]

#71

Ada seems like a really good language. Is there any reason why it isn't more popular?

> Is there any reason why it isn't more popular?

There are a few; if you head over to comp.lang.ada you can find threads on the issue by people who were involved at the time. As I understand it though there are four or five points:

1. Ada was designed and specified completely before any implementations were extant, it used then bleeding-edge theory and integrated several big concepts/features: this lead to the very first 'implementations' being either incomplete or pretty bad performance-wise.

2. The backlash among DoD contractor's programmers; "Don't tell us what language to use!"

3. The rise of C's popularity; I believe this had massive consequences, ultimately setting back the field of computer science by decades. [Take a look at Multics, VMS, and the Burroughs... then realize how many of their features have been added to 'popular' OSes in the last 10–15 years.]

4. Misunderstanding the compiler's mindset: a lot of programmers take the view that they need to "shut the compiler up" rather than as the compiler helping them out by finding problems.

5. Misunderstanding "mandatory checks" — a lot of programmers are used to C & decedent's "simple" nature and really don't understand how things can be leveraged. A good example here is the sequence F(F(F(X))); if F takes Natural and returns Natural, then there is only one check that is needed for this sequence: N on the innermost call... and if X is defined as natural, even that check can be optimized away.

Re: Ada for the C++ and Java Developer [pdf]

#72
post #62

Earlier quoted context omitted.

Oh, thanks for pointing it out. Honestly, I was more interested in leveraging the type system than on proper dimensional analysis. I could find no mechanism by which Ada allows the programmer to disable the default operation overloads, so I decided to try that out.

IIRC you can disable/forbid the default like so: Function "*"(Left, Right: Distance) return Distance is abstract; then use: Function "*"(Left, Right : Distance) return Area;

That seems to do the trick for an individual predefined operator specification. Thanks!
Post reply on HN