[HN Gopher] Ada crate of the year 2024 announced
       ___________________________________________________________________
        
       Ada crate of the year 2024 announced
        
       Author : LionelDraghi
       Score  : 74 points
       Date   : 2025-02-09 19:37 UTC (3 hours ago)
        
 (HTM) web link (blog.adacore.com)
 (TXT) w3m dump (blog.adacore.com)
        
       | ltbarcly3 wrote:
       | Its interesting how PR works (I'm being earnest) . A library
       | nobody uses for a language almost none of us will ever use
       | (developed by the US government and never adopted for any project
       | for any use case except where required by US contracting
       | requirements, and even then almost always given an exception to
       | not use it) is the top story on HN. Well done.
       | 
       | Please note: I'm not saying Ada is bad, it is a very interesting
       | language and well ahead of it's time. I'm just saying it's not
       | popular or in widespread use when compared to almost any other
       | computer language you can list (which is just an objective fact),
       | so it is interesting to me that this made it to #1. Please try to
       | keep that in mind.
        
         | skissane wrote:
         | > and never adopted except where required by contract
         | requirements
         | 
         | A lot of the software on the Boeing 777 is written in Ada.
         | AFAIK, that was Boeing's decision, not due to any government
         | contract requirement-as a commercial aircraft, governments are
         | not the primary customers
        
           | ltbarcly3 wrote:
           | Sorry, nobody plus one airplane plus one model of rocket.
           | 
           | Thank you for correcting me, it is very popular and probably
           | hundreds of programmers used it around 40 years ago?
           | 
           | (I can look on wikipedia and see lists of who uses it too,
           | the fact that you can list all the users doesn't really
           | refute what I'm saying but whatever)
        
             | skissane wrote:
             | Ada is the basis of SPARK, [0] which takes Ada and adds
             | formal verification.
             | 
             | While no doubt massive overkill for 99.9% of applications,
             | there are a small number of use cases (safety-critical or
             | security-critical code) where it can actually make sense.
             | 
             | While in principle you could add formal verification to
             | other languages, I'm not aware of any other such solution
             | with as much mindshare as SPARK. Ada's feature set is
             | already closer to what you need for that purpose than what
             | many other languages offer, so even though SPARK still has
             | to both subset and superset Ada, the same thing with other
             | languages would arguably require both taking more away and
             | adding more.
             | 
             | [0]
             | https://en.wikipedia.org/wiki/SPARK_(programming_language)
        
             | csb6 wrote:
             | It is not just one airplane. It is still common in defense
             | and aerospace software, as well as other safety critical
             | code (Nvidia recently started using the SPARK subset for
             | some of their firmware I believe). Just because you don't
             | know anyone using it doesn't mean it isn't used.
        
         | currymj wrote:
         | 1) memory safety at compiler level, 2) type systems that have
         | dependent types or similar such features, are both things
         | people have gotten interested in again recently, especially
         | because of the excitement around Rust. (you can see this
         | connection from the use of the word "crate" here, which is a
         | Rust term originally.)
         | 
         | Ada is a language that had features dealing with these problems
         | way back in the 1980s, so people have suddenly become
         | interested in revisiting it.
        
           | ltbarcly3 wrote:
           | I agree it's an interesting footnote in computer history.
        
           | fresh_broccoli wrote:
           | >1) memory safety at compiler level
           | 
           | Ada isn't memory safe. It doesn't have anything resembling a
           | borrow checker. The spec used to allow an optional garbage
           | collector, but that was never widely used in practice and was
           | removed in Ada 2012. The average production codebase relies
           | on Unchecked_Free/Unchecked_Deallocation for memory
           | management.
           | 
           | I find it genuinely baffling that so many people who praise
           | Ada clearly don't know and/or don't use the language.
        
             | trott wrote:
             | Yep, and even without dynamic memory management, Ada is not
             | type-safe: https://www.enyo.de/fw/notes/ada-type-
             | safety.html
             | 
             | Rust also has soundness holes, by the way. This one is
             | almost 10 years old: https://github.com/rust-
             | lang/rust/issues/25860
        
             | AlotOfReading wrote:
             | Ada/SPARK can be memory safe, in part because they borrowed
             | ideas from Rust.
             | 
             | [0] https://blog.adacore.com/using-pointers-in-spark
        
             | currymj wrote:
             | i was very careful to use the vague phrasing "features
             | dealing with these problems" and not "Ada has a borrow
             | checker and dependent types".
        
         | airstrike wrote:
         | _> Please don 't post insinuations about astroturfing,
         | shilling, brigading, foreign agents, and the like. It degrades
         | discussion and is usually mistaken. If you're worried about
         | abuse, email hn@ycombinator.com and we'll look at the data._
         | 
         | https://news.ycombinator.com/newsguidelines.html
        
         | synergy20 wrote:
         | is rust reinventing the wheel here? i have been thinking rust
         | is just the new Ada,but more complicated.
        
           | ltbarcly3 wrote:
           | Rust is the new C++ but safe. That's what it is trying to be
           | and pretty much what it is.
           | 
           | Ada is not a 'good' language by moderns standards. If you
           | tried to use it you would probably be extremely frustrated.
           | This isn't because it's poorly made, languages have grown a
           | lot since the 80's. The C++ they wrote in 1985 would be
           | extremely frustrating to work with by modern standards too.
        
             | kqr wrote:
             | Ada is also C++ but safe, so I don't see that as a
             | refutation.
             | 
             | Ada has been a great language for lower-level code by my
             | (modern) standards. I'm not sure what you're on about and
             | the lack of concrete examples make it hard to guess.
        
         | shaky-carrousel wrote:
         | A lot of us hold Ada in high regard. Your comment is a typical
         | example of someone not realizing how much they don't know.
        
         | Capricorn2481 wrote:
         | It only needed ~20 upvotes to get to the top story. You make it
         | sound like they moved heaven and earth to get on here.
        
         | pyrale wrote:
         | > never adopted for any project for any use case except where
         | required by US contracting requirements
         | 
         | AFAIK, this is wrong. I've seen the language used for a core
         | system continuously developed over decades at a financial
         | institution with no link to the US, for instance.
        
           | Jtsummers wrote:
           | It's also used in aerospace and safety critical systems work
           | in Europe, though I'm not sure the extent. In the US, post-
           | mandate, that work is almost all Fortran, C, C++, or now
           | maybe Rust (I'm meaning work that started after the mandate,
           | pre-mandate it was more varied).
           | 
           | 787 was the newest system I worked on in the US that used
           | Ada, and that was optional for the software vendors. I think
           | the OS our software ran on was written in Ada, though.
        
         | dang wrote:
         | Ada would count as an exotic / niche language for most of this
         | community and those are perennially popular on HN. That's
         | sufficient to explain the upvotes (which looked legit to me
         | when I checked the data).
         | 
         | Also, these things tend to come in waves, even though we try to
         | discourage that, and this was on the frontpage for 10 hours
         | yesterday:
         | 
         |  _Ada Gems (2014)_ -
         | https://news.ycombinator.com/item?id=42986149 - Feb 2025 (9
         | comments)
        
       | rustyconover wrote:
       | Ada was the first language they threw at us in university back in
       | '98. At the time, it felt like learning Latin to become a poet,
       | but looking back, those lessons--rigor, clarity, and discipline--
       | have aged better than some modern frameworks. Ada may not trend
       | on GitHub, but it quietly shaped a generation of better
       | programmers.
        
         | kqr wrote:
         | Indeed. As a concrete example of one of those things Ada gets
         | very right, it breaks down object-oriented programming into
         | separate features of
         | 
         | - encapsulation,
         | 
         | - reuse,
         | 
         | - inheritance, and
         | 
         | - dynamic dispatch.
         | 
         | In Ada, you can opt into each of those things separately,
         | depending on what you need "object-oriented programming" for.
         | This is in big contrast to Java, where you type the keyword
         | "class" and then all of that comes along for the ride.
         | 
         | I never truly understood OOP until I worked a bit with Ada.
        
           | MortyWaves wrote:
           | Do you have some examples of this? Sounds interesting. But
           | unsure what is different to plain composition approaches?
        
             | thesuperbigfrog wrote:
             | See https://learn.adacore.com/courses/intro-to-
             | ada/chapters/obje...
        
         | tolerance wrote:
         | What kind of programs did they teach you to write in the
         | language?
        
         | ChuckMcM wrote:
         | I believe for the same reasons that Latin helps develop a
         | foundation in language, the people who designed it were looking
         | at the problem from many different levels all at the same time.
         | The first language I encountered with split behavioral / code
         | components was Mesa at Xerox, and then Modula 2. (later VHDL
         | but that's different?)
         | 
         | I think at the other end are lisp/forth list/stack languages
         | which made this particular crate:
         | https://github.com/BrentSeidel/Ada-Lisp-Embedded/tree/main/s...
         | getting an award interesting to me. The combination of the two
         | languages has an expressibility that individually they don't
         | possess.
        
           | throwup238 wrote:
           | I'm not sure whether to agree or disagree with this
           | perspective/analogy. On the one hand, Latin declinations
           | prepare one for a wide variety of languages as diverse as
           | English, French, and Russian, on the other hand the Roman
           | Republic/Empire had such a wide influence - supposedly a
           | third of the global population at its peak - that it's hard
           | to extricate the path dependency from the true influence of
           | Romance languages.
           | 
           | There's so much cross pollination in programming languages
           | that I'm not sure where to draw the line. Even trying to
           | probably isn't worth the effort.
        
         | taurknaut wrote:
         | I'll believe it when I see it.
        
       | andrewl-hn wrote:
       | Interesting that they decided to adopt the word "crate" (from
       | Rust) for libraries published to the registry, and just like Rust
       | they use TOML as a format for a package file.
        
         | bongodongobob wrote:
         | Why is that interesting?
        
           | Philpax wrote:
           | Ada influenced Rust, so it's interesting to see that
           | influence flow backwards, too.
        
         | nicce wrote:
         | Ada has already "package" term used in a different context.
        
       | tiffanyh wrote:
       | Has anyone developed in SPARK [0]?
       | 
       | My understanding, its _significantly_ safer than Rust (and based
       | on Ada) with equal performance.
       | 
       | A comparison chart of Ada vs Rust vs SPARK [1].
       | 
       | Most notable: Rust mainly provides memory safety ... but SPARK
       | provides not just memory safety, but also safety from all run-
       | time errors, formal properties, constraint checks, and more.
       | 
       | [0] https://en.wikipedia.org/wiki/SPARK_(programming_language)
       | 
       | [1] https://blog.adacore.com/should-i-choose-ada-spark-or-
       | rust-o...
        
         | Ygg2 wrote:
         | > My understanding, its significantly safer than Rust (and
         | based on Ada) with equal performance.
         | 
         | Ada or Ada Spark? Ada Spark is more of a theorem prover, so the
         | comparison to Rust is a bit weird.
         | 
         | It's true it's safer - it will protect you from a more
         | programming errors, but you need more annotations to prove
         | properties of a program.
        
       | fiddlerwoaroof wrote:
       | I haven't tried Ada recently, but the issue I always have run
       | into is setting up a toolchain that wouldn't automatically force
       | the binaries I compile to be GPLed. Is the story for writing and
       | distributing MIT or Apache2 licensed software in Ada any better
       | these days?
        
         | Jtsummers wrote:
         | That's been a non-issue for several years now.
        
           | fiddlerwoaroof wrote:
           | Good to know, I passed over Ada for Common Lisp around 2015
           | because of this.
        
         | actionfromafar wrote:
         | I wonder if some misconception can have snuck in there somehow.
         | GCC (which also has an Ada compiler) has its lowest level link
         | libraries under GPL. But there's a link level _exception_. This
         | is the same for C, C++, Ada, whatever languages GCC supports.
         | (IIRC.)
         | 
         | (Edit: apparently it _used_ to a problem as per sibling
         | comment?)
        
           | fiddlerwoaroof wrote:
           | The binaries AdaCore used to distribute stated that you had
           | to get gnat elsewhere for this link level exception because
           | the runtime library they distributed did not have the
           | exception. But, I'm glad to know that this restriction has
           | been solved.
        
       | watersb wrote:
       | I recall my C++ class, via the University of California Extension
       | program.
       | 
       | In the 1990s Bay Area, there was a catalog of hundreds of
       | classes, taught after business hours or on weekends. The classes
       | for security certification, or BGP routing, or C++, teacher and
       | students were usually industry professionals.
       | 
       | We learned C++ object design of a style I would consider fairly
       | strict, strong typing. Details escape me at the moment.
       | 
       | But I do remember the two graybeard Ada programmers sitting in
       | the back of the room: "C++ compiler will accept that? Are you
       | kidding?"
       | 
       | Raytheon or Honeywell, I think. Missile drivers.
       | 
       | Ada programmers.
        
       | taurknaut wrote:
       | Isn't ada like 40 years old? How have its users not found new
       | languages?
        
       ___________________________________________________________________
       (page generated 2025-02-09 23:00 UTC)