Hacker News new | past | comments | ask | show | jobs | submit login

One benefit I had from learning Ada was that it treats encapsulation, implementation hiding, inheritance, subclassing, message passing, etc. as separate mechanisms that you can opt into individually.

This is a huge difference compared to something like Java or Python where "everything is a class and a class is everything", and if you desire implementation hiding you sort of automatically also opt into get encapsulation and subclassing and the rest of it.

When you learn the mechanisms individually, object-oriented programming starts to make a lot more sense! Ada is worth looking at just for that experience alone! Then the other things are a bonus.




This connects to another of Ada's advantages: language-integrated support for subsetting the language. In the C world, you can define a subset of the language, but if you want a tool to ensure compliance, you're on your own. With Ada, you can define a 'profile' and have the compiler check compliance.

This has been done with the Ravenscar profile (for real-time work) and, most famously, the SPARK profile (for formal verification).

(There isn't integrated support for user-defined style guide conformance though. From the perspective I've used here, MISRA C is both a subset and a style guide.)

Some ancient documentation on RavenScar: https://gcc.gnu.org/onlinedocs/gcc-4.5.4/gnat_rm/Pragma-Prof...


Is there some good, free, open-source ADA implementation one can try out?


You can get going with the Alire package manager which installs the Free Software Foundations GNAT compiler (part of GCC) in a few minutes: https://ada-lang.io




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: