Live data from Hacker News

Ada: a C Developer's Perspective

methodsandtools.com

1–10 of 157 posts

Re: Ada: a C Developer's Perspective

#2
I had a strange internship topics involving Ada. I tried to run a huge program (a simple stdio wrapper around a huge library actually) on an Android machine (Android 2.3, ARM). At that time, the only ADA compiler for ARM was available on BSD so I had used a Windows machine for development and a OpenBSD laptop for compiling the wrapper.

The subtyping feature I love the most. You see the benefit when you need to call a function which is taking many numeric arguments, all of them is a subtype so you can't give the arguments in the wrong order (latitude and longitude for example).

Re: Ada: a C Developer's Perspective

#5
It's such a pity these days there is no modern tool chain/workflow for Ada (or C++ for that matter). I mean, a package manager, a build tool with integrated dependencies. As far as I know, there is very little open source software for Ada. It's a shame, because I feel like the language would become more mainstream, if only better tooling was easily available.

Re: Ada: a C Developer's Perspective

#6
It's not only a language that is key to success. Libraries. I searched for LDAP support for ADA (old protocol used by many companies). I found library (http://savannah.nongnu.org/projects/adaldap/) with latest news from 2002 and CVS repo :) Then I search for SNMP (another dinosaur still in wildly use) - similar result.

Second - many solutions/libraries are purely commercial. You need basic open protocols support by default /free. Otherwise such great language will still be at it's niche.

Rust is on a good path to became XXI century successful Ada :)

Re: Ada: a C Developer's Perspective

#7
Ada ticks a fair amount of the boxes in the "Interesting statically compiled languages by wishlist features" google doc, which I started, and had some crowd-sourcing help to fill in:

https://docs.google.com/spreadsheets/d/1BAiJR026ih1U8HoRw__n...

(Would be cool if we could fill out those remaining white cells btw ;) )

Re: Ada: a C Developer's Perspective

#8
post #4

So how does Ada go speed wise (real world not micro benchmarks)? Were/are there legitimate reasons to opt for c over Ada?

On early PCs, Pascal and C were pretty much tied in popularity. Both were free to implement, and small enough that you could make a fast compiler on a typical PC with only 256-640 kB RAM.

C won because it was more flexible and was chosen by Microsoft, but Pascal definitely had a strong following (it was the original Mac's API language, and on PC it was a major contender thanks to the nice and fast Turbo Pascal IDE).

Ada was a complicated and rigid language designed by a Department of Defense committee. That was not great PR for those early individualist PC users. (Who wants to program in the language of "The Man"?)

If Pascal was a Cessna and C was a Learjet, then Ada was the F-35 -- complex, expensive, late.

Re: Ada: a C Developer's Perspective

#9
post #6

It's not only a language that is key to success. Libraries. I searched for LDAP support for ADA (old protocol used by many companies). I found library ( http://savannah.nongnu.org/projects/adaldap/ ) with latest news from 2002 and CVS repo :) Then I search for SNMP (another dinosaur still in wildly use) - similar result. Second - many solutions/libraries are purely commercial. You need basic open protocols support by…

Ada is so stable and backwards compatible that old libraries will work just fine, unless they have external dependencies or depend on things that change fast in the outside world.

For me personally Rust is not a good Ada replacement, because 1) it has the usual obscure syntax - maybe to attract C++ programmers, who seem to like obscurity -, 2.) many semantic tricks and borrower idiosyncrasies that makes it harder to write, read and maintain than idiomatic Ada, and 3) it's fast changing. The good thing about Ada is that it is self-documenting, it's almost impossible to intentionally or unintentionally obfuscate it, and once you've written a program it will continue to work 10-20 years later.

Re: Ada: a C Developer's Perspective

#10
post #5

It's such a pity these days there is no modern tool chain/workflow for Ada (or C++ for that matter). I mean, a package manager, a build tool with integrated dependencies. As far as I know, there is very little open source software for Ada. It's a shame, because I feel like the language would become more mainstream, if only better tooling was easily available.

For C++, I'm reasonably happy with CMake and the Jetbrains CLion IDE.

CMake makes it relatively painless to wrap multi-platform dependencies without having to explicitly know whether they come from a Unix package manager or from Windows DLLs.

Post reply on HN