by kqr · 8y ago · 0 comments
...except the outer, most superficial level. I'm genuinely afraid that it will never "catch on" because it just looks weird. (But not weird enough to attract that kind of people.)
It's a shame because
- Ada generic packages are exactly what C++ templates should have been
- Derived types and record extension is inheritance that makes sense
- Access types are obvious in hindsight
- Correct terminology for procedures and functions does help a lot in communication
- RAII in the shape of controlled types feels a bit bolted on but it works very well
- Named blocks and explicit closing is easy but very useful
- Class-wide types are deemphasized the way polymorphism should be
- The -gnatyy flag is almost as good as gofmt.
- Tasks and protected types form a very intuitive and safe concurrency mechanism
- Having contract-based programming as an option built into the language is way superior to relying on asserts in the procedure
- While not always budgeted for, when there is time to spend, SPARK is uh-mazing. Strong guarantees at relatively low cost, and reasonably easy to learn as well.
Is it not? It doesnt contain recipes, no, but it fully documents the fundanental units of the language youll express your solution in.
Yes, Stepanov's first attempt at writing something like the STL was done in Ada. But no, it wasn't "the STL" - it was neither Standard nor Template.
And Stepanov abandoned Ada for C++, because Ada wasn't expressive enough for what Stepanov was trying to write.
And yes, it wasn't quite the STL, we had quite a few variations of it, the most well known coming from SGI, until things kind of settled at ANSI.
And C++ was among the better candidates for the language to use. It was more suitable than Ada.
And, do you have any basis for the statement that Stroustrup advocated C++ to Stepanov?
Then you might be interested in https://nim-lang.org/ as a Pascal-like Rust alternative.