5 ms·
Ada doesn't support safe GC-less memory allocation, which means it's either unsafe, far worse feature-wise than C or requires a GC which also makes it not stric
by devit 11y ago
Ada doesn't support safe GC-less memory allocation, which means it's either unsafe, far worse feature-wise than C or requires a GC which also makes it not strictly better than C.
As a consequence, it seems that if you use Ada's GC, you might as well use Java instead, and if you don't you might as well use C++ instead, which along with its unattractively verbose and not C-like syntax is probably why Ada is not very popular despite having been around for 30 years.
- nickpsecurity 11y agoAda does most allocation, including local dynamic, on the stack. From there, for the heap, you get to choose whether to manage individual pieces of memory, work from whole pools, or do GC. With these, you get help from the type system in catching or preventing errors. Past that, there's the usual risks. Requires a lot less memory management and runtime overhead than Java while preventing way more problems than C. And, as I often say, the empirical studies all showed C doing far worse in terms of defects introduced. Ada benefiting safety & productivity over C is a proven fact rather than an opinion. So, questions are: (a) should we use it for this project? (b) should we build on a proven solution and make it better?, and especially (c) should we borrow anything in this that made it effective when designing a new language? I especially push for (c) to be applied any time new tech is built. Ada is my reference for safe, systems programming because it did what it promised and is the oldest one still updated/used. Also turned out almost as future-proof as COBOL with a lot safer, easier maintenance. Such longevity, along with safety, benefits enterprises writing mission-critical software. Details on various safety mechanisms: http://www.adacore.com/knowledge/technical-papers/safe-secure/ http://www.adacore.com/knowledge/technical-papers/safe-secur... Far as replacements, Rust is looking promising. Needs to mature a bit and better tools for various situations. A great design, though, with a lot of potential. Not sure how it would fare for embedded, though: Ada was used in microcontrollers and stuff.
- steveklabnik 11y agoRust is actively used on embedded projects. The sticking point is mostly if the architecture is one that LLVM supports, which means that are some platforms we can't support.
- nickpsecurity 11y agoAppreciate the clarification on that.
- steveklabnik 11y agoAny time. It's hard to remember all the details of tons of different languages...