The state of Rust trying to catch up with Ada [video]
170 comments
·February 10, 2025throwaway81523
eschaton
Ada definitely targets the same domain as Rust, it just _also_ targets additional domains like low level control systems. It has a lot of flexibility and is quite a good language design that people seem irrationally prejudiced against because it has Algol/Pascal-flavored syntax instead of C-flavored syntax.
tialaramex
Oh! It's about Pattern Types!
I want Pattern Types for an entirely selfish reason, I want to write BalancedI8 and similar types -- as user defined types, but in stable Rust and have them Just Work™.
BalancedI8 is similar to i8 (an 8-bit signed integer) and to NonZeroI8 (the same type but, with a niche where zero should be), instead of removing zero, which we often have a use for, lets remove the annoying most negative value i8::MIN
Why "BalancedI8"? Because now that we've removed this most negative number (to provide a niche) the remaining value is symmetrical, it goes from -127 to +127
Now, I profess that I want these types but I clearly don't want them enough to do very much about it, so that's not great.
noneeeed
Nice!
My first job was mostly SPARK Ada, subtypes were so useful, both in terms of making contracts clearer for the human and for the various analysis tools.
Rust is high on my list of languages to learn when I can make some time, having something like this available will be great.
eslaught
Maybe not fully ergonomic yet, but this exists today (at least for max):
https://docs.rs/nonmax/latest/nonmax/
If you're really attached to it being min you'd have to copy that library.
Edit to add: we actually use these in one of my main Rust codes; they're useful, but I'm not sure they're so useful I'd want them built into the language.
tialaramex
Yeah, the XOR trick†. It's very affordable on modern hardware (your CPU can cheerfully XOR two registers while doing other things, barely measurable) but it's more the principle of the thing. Maybe I should just put up with the XOR trick and stop thinking about Pattern Types but I don't think I'll be able to.
† Just in case you've never looked inside those types, they have a constant value and when you want a NonFoo you just take a NonZero and you XOR it with that constant, in other respects they work the same way as any other wrapper type. This is one reason the NonZero types exist, they make the XOR trick very easy to do.
sampo
> I want to write BalancedI8
So, you want an integer, but one value sacrificed to denote not-a-number? Is this what "niche" means?
So that with these, you can have Option[integer8, None], an option type that either contains a -127 to +127 8bit integer or contains the empty value, and still consumes only 8 bits of memory? Or are there other uses for this?
And Rust already has this, and with the memory optimization, but for some reason only the version where they sacrificed the value 0.
Joker_vD
The main use is not having to deal with INT_MIN, the two chief problems of which is that you a) you can't sensibly abs() it, b) most people tend to forget about point a). This problem in my experiences most commonly arises in naive implementations of itoa/etc. which tend to assume that they can just call abs() and concentrate on the positive half-range signed integers. Nope, you can't do this, not all negative integers have a positive counterpart.
tialaramex
Yes, I want to be able to make such types myself.
You're correct that Rust provides NonZeroI8, which in fact I called out in my text. If you look at the source, you'll see that the Rust standard library is allowed to make this type but you can't in stable Rust,
[rustc_layout_scalar_valid_range_start(1)] means, "Hey, Rust compiler, I promise it's fine to just assume I never have this value: 0". You absolutely could write BalancedI8.... if you're the Rust standard library. Unfortunately you aren't allowed to do that in your own stable Rust software because it needs these compiler internals.
There were discussions about stabilising this idea, and they were knocked back because if you do that you're basically stuck with it forever.
One day in the future NonZeroI8 could "just" be a Pattern Type, like the ones you can make at home, but today there are no Pattern Types and NonZeroI8 needs compiler magic.
There are other Rust core types which you could make yourself, IPv4Addr for example is just a 32-bit value, you could make your own, but yours wouldn't be on everybody's Rust system. Option<&T> is just a sum type over &T and None, you genuinely could make your own, call it Maybe<&T> and it would work exactly the same - same optimisations even, although not all the compiler diagnostic messages would be as good if you use it wrong I think. But today NonZeroI8 isn't like them, it actually needs a sprinkle of compiler magic.
edflsafoiewq
They're sort of used in graphics APIs. When a value in [-1.0, 1.0] is quantized to an i8, the result is a BalancedI8: -1.0 maps to -127, 1.0 to 127, and -128 is unused; if -128 is used in the dequantizer, it is treated the same as -127. This replaced the old scheme where -1.0 mapped to -128 in which 0.0 was unrepresentable.
The value of encoding this case in the type system seems minimal to me though.
ziml77
The reason to encode it in the type system is it allows for optimization. Option<NonZeroI8> uses a single byte because it knows 0 is available to represent the None state. Option<BalancedI8> could do the same thing with -128 representing None.
null
auggierose
What are pattern types? Cannot watch the video, too slow.
Edit: Thanks for the explanations. From what I see, pattern types are subtypes of a given type, such that the subtype predicate can be specified as a pattern match. This way, pattern types are subtypes that can be checked at compile time (at least, if the used pattern can be checked at compile time, I don't know if all Rust patterns are compile-time checked).
amelius
The term "pattern type" is more or less invented by Rust. See this old comment, and the first reply in particular:
kreco
And from what I get it's basically the same idea as Ada's "subtyping"[0].
subtype Rainbow is Color range Red .. Blue;
subtype Small_Int is Integer range -10 .. 10;
[0] https://www.adaic.org/resources/add_content/standards/05rm/h...mbStavola
As an update to my previous comment in the linked thread, the aforementioned minimal version of pattern types have been merged and generic support is currently being implemented[0]. Slowly but surely, we're getting there!
Lucretia9
Pattern matching is in all functional languages, afaik.
Ygg2
They're called pattern types because the intention is to allow them to match a Rust pattern expression (more or less, no idea how conditionals would work).
Ygg2
There is a pdf of presentation in the link...
Pattern types or liquid types or dependent types are a way to express a subset of a type. E.g.
type NonNull = usize is 1..
type PokerNonFaceCard = u8 is 2..11
Yoric
Having pattern types would be great!
fuzzy_biscuit
I'm seeing a lot more Ada posts on the front page recently. Was there a big investment in Ada recently or an acquisition where its marketing machinery is starting to chug along? Or was there a meaningful release or something?
andrewl-hn
Even with administration change in the US there is a long-term initiative across multiple agencies to eventually move to more robust software, and a part of it is the push towards more safe programming languages (where safe means fewer memory issues, fewer vulnerabilities, less bugs in general, etc.). Similar government initiatives now start in Europe and elsewhere in the world, too.
This regulatory change is not new, it has been going on for years and will take more years to finish. And even without a regulatory pressure, the migration would happen eventually. Look at the cars. As they get more features like adaptive cruise control and various driver assistance features, the need for software that runs with no lag and is reacting to surroundings correctly and quickly becomes absolutely critical. Car companies now can go out of business simply because their software is buggy. The car vendors now produce more software than ever, and they are in dire need for better programming tools than ever.
Languages like Java, Scala, C#, Go, etc. cover many scenarios like cloud services and, for example, car entertainment system. But for devices, microcontrollers, real-time low latency systems etc. C and C++ have been the go-to languages for decades, and now it is starting to change, because turns out it is very, very hard to write correct, bug-free, safe, and secure software in these languages.
Rust is one language that is getting into this market: Rust Foundation established a Safety-Critical Rust Consortium last year, for example, and Ferrocene compiler has a bunch of certifications done already. Ada is another option that would work for many such use-cases, too. The selling point of Ada is that it's been around for a long time and many vendors already have established compilers and tools with all appropriate certifications and qualifications done for all sorts of industries.
So, it's not really "Ada is interesting" and more "Languages that can replace C and C++ are interesting".
imglorp
The new administration has removed the memory safe programming languages memo.
https://web.archive.org/web/20250118013136/https://www.white...
_a9
The Whitehouse website gets cleared for the incoming administration.
The page was moved to: https://bidenwhitehouse.archives.gov/oncd/briefing-room/2024...
steveklabnik
A lot of this movement continued to happen under the previous Trump administration; we have no idea what is going to happen, there are good arguments that it may go away, but also ones that argue it will accelerate or intensify. We’ll see.
null
Lucretia9
[flagged]
999900000999
Am I a bad programmer if rust is really difficult for me. I desperately want to learn a low-level language, since I think I'm missing something hanging out with my buddies C#, Python and NodeJS.
C and C++ are too difficult, Rust is also hard. I think my best bet is Zig at this point.
coaksford
No, Rust gives you a lot to wrap your head around very quickly, and it took me three or four epiphanies to get it, and I tried to learn and stopped twice before I was able to get far enough along with it that it became easy to think about and work with. It doesn't make you bad programmer, but I'd still suggest giving it another shot every 6 months or so as your time allows, and see if you're getting farther each time. As long as you're still learning each time you bounce off of it, it was probably time well spent, most Rust concepts will show up in other languages, and the ones that won't are still useful paradigms to be aware of so you can contrast it with other paradigms as you get more experience with those.
the8472
If you have written multithreaded C# code which encountered deadlocks, race conditions and had to build a mental model of which thread is responsible for what and currently "owns" a resource and is allowed to modify them... then you already kind of know a bunch of things implicitly that rust makes explicit and can transfer that knowledge.
At least that's how things clicked for me when I came from Java and I already had to debug lots of concurrent code before.
Similarly, if one has fought with a garbage collector and thought about efficient memory representations, where things get allocated and deallocated that transfers to some extent.
If you have been living blissfully in effectively-single-thread-land, then yeah, there'll be a bunch of new concepts to digest.
switchbak
C is small enough as to be very valuable to know. It's not the "high level assembler" that it was originally sold as, but as a conceptual model it's invaluable. It's also very valuable to run through CVEs, bug reports and such to find out how it falls down, and why safer languages have value. You can learn all that without even learning it to such a degree that you can write code in it.
I know you said C seems too hard - I felt the same way some 30 years ago. Then I learned Pascal, and found learning Ada to be a bit of a breeze after that. After that, coming back to C was a different experience - very natural. You don't have to force anything, and you can learn whatever you want whenever you want (or not at all).
Sometimes your capabilities can quickly level up in unpredictable and exciting ways - which I find to be one of the most fun parts of programming. And it tends to unfold like a horizon - you learn low-level stuff, then you get interested in high-reliability software, or real-time systems, or highly parallel / functional systems, etc. This is all great, and no one brain is big enough to hold it all - so have fun!
apitman
Learning Rust is easy. I've done it 3-4 times now.
zozbot234
Rust is very different from Python or C#, let alone NodeJS. I'm not sure what exactly is so difficult about Rust for you, but the basic feature-set of Rust as "your first programming language" (i.e. no prior experience with C/C++) is one where the main emphasis to begin with should be on passing stuff by value and explicit copying, almost like a functional language - avoiding both references and interior mutability. These latter features should be looked into after you've become familiar with the basics, so as to avoid any confusion.
WD-42
No, Rust is definitely hard. One of the best memes I’ve seen about rust goes like “Other languages have a garbage collector, with Rust you are the garbage collector.”
I also haven’t had as much fun learning another language in a long time. Keep with it! It’s worth it.
knowitnone
Why is Zig easier than C/C++/Rust?
api
Rust has a steep initial learning curve followed by a plateau of enlightenment.
The language has a lot of corners though -- not so much messy edge cases like C++ but just emergent complexity from its sophisticated grammar and type system.
As with all such languages: you do not have to make use of all language features everywhere, and in fact you should not.
eikenberry
> The selling point of Ada is that it's been around for a long time and many vendors already have established compilers and tools with all appropriate certifications and qualifications done for all sorts of industries.
This makes it sound like the field is dominated by proprietary/closed-source tooling. That is a huge red flag for the health of the language if true.
rad_gruchalski
Well, yes. But that's the feature in this context. The point is: places where Ada is used require certain levels of qualification and certification, all the way down to the compiler. You have to be able to prove that that binary fragment was produced by that particular code fragment. Think aircraft, nuclear reactors, rockets.
So this tooling is already certified and it fills the "compiler + various verification tools" space. Otherwise you'd have to certify your tool chain yourself every time it changes.
Say you are building an aircraft. The whole software stack is part of the aircraft certification, all the way down to the compiler. A complete aircraft is a system composed of other systems which themselves are composed of other systems. Eventually, there's a software system. Systems are certified independently and for a complete configuration.
Of course, requirements get stricter as the criticality of the component increases. Not every component has such strict requirements as discussed above. But a lot of them do.
Lucretia9
That's why Toyota moved to Ada, because their C or C++ software caused crashes.
LiamPowell
The popularity of Rust has caused a lot of people to start taking safety more seriously. Ada is the safety language for everything except memory and thread safety (they're pretty safe still, but not completely like in Rust).
I think some of it also comes from the number of new programming languages that have come out over the last few years. It's common for people to point at Ada as a reference for how to address problems that come up in C-like languages since Ada already solved so many problems in the 80's.
jghn
My assumption has been that Rust's rise to prominence here has led people to investigate & reflect more on prior art in the realm of "safety" in the PL world. This leads them to Ada. And as there's a general trend in HN to look at less traveled roads it starts popping up here. the Baader-Meinhof phenomenon starts to kick in and creates a feedback loop
coliveira
No, if it was for the bandwagon in social media, everybody would be forced to use Rust. However companies that work on government contracts have for a long time used Ada, and they have a lot of software and investment there. So, with the recent government advisories, the Ada tech is coming back to fill that opportunity.
throwaway81523
I would say Ada got a lot nicer when Ada 2012 was released, and interest picked up since then. Around the same time, C++ got a lot nicer with the release of C++11.
kevin_thibedeau
People have gotten fed up with smug rustaceans shouting about 40 year old technology.
unshavedyak
If only that 40 year old technology could have captured attention in the last 40 years.
rightbyte
I don't think an Adacian missionary has ever knocked on my door. Rustafarians were twice a week at some point.
jghn
I'm more fed up with smug rustaceans acting like everything Rust does is somehow novel. Just because *you're* not aware that a language feature already existed earlier doesn't mean Rust invented it.
zozbot234
The whole point of Rust was to take developments in programming language theory from 20 years ago or so and make them practical for widespread use. Practically nothing Rust does is new, because "new" stuff means that the overall implications of that language feature have yet to be figured out. Which is bad if you want to keep your language elegant and easy to learn.
spoiler
People will point out features they like about Rust, sure. But I've never seen anyone be smug about it, or claim they're novel features.
Edit: Maybe these types of low quality comments exist on social networks, but... Isn't that just the norm for social networks? You can say the same about cooking advice on social media, or "life hacks" content, etc
escobar_west
Is there another language out there which encodes lifetime semantics and affine types besides Rust? AFAIK there isn't (happy to hear otherwise though).
bluGill
There was an interesting conference where Ada was presented. Ada marketing has gotten better over the years as well. Still not enough that I'm trying it, but it remain intrigued.
m463
Self driving cars?
dismalaf
I think Rust opened up a ton of interest in languages that are as fast as C++ but safer... The fact that Ada was doing a lot of stuff that Rust is trying to do now but decades earlier is particularly interesting.
kevlar700
Whenever I can use Ada. I wouldn't use anything else.
cutemonster
What do you build / have you built, using Ada :-)
kevlar700
Hardware products like sensor and control devices. I also use it for desktop tooling whenever a script wants a for loop. Unfortunately I use Flutter for GUI stuff because I hate js and because it has Android/IOS plugins that I would have to write if using Gnoga.
nicce
How is Ada without touching anything commercial?
dpc_01234
BTW. What's the best way to go over/keep track of all available FOSDEM talks videos?
nickdothutton
Ada was my first (non hobby use) language. Mostly on VAX/VMS with LSE as the "IDE", and I use the term IDE loosely :-). Although I encounter it rarely I'd encourage anyone to take a look.
westurner
From "Industry forms consortium to drive adoption of Rust in safety-critical systems" (2024-06) https://thenewstack.io/rust-the-future-of-fail-safe-software... .. https://news.ycombinator.com/item?id=40680722
rustfoundation/safety-critical-rust-consortium > subcommittee/coding-guidelines/meetings/2025-January-29/minutes.md: https://github.com/rustfoundation/safety-critical-rust-conso... :
> The MISRA guidelines for Rust are expected to be released soon but at the earliest at Embedded World 2025. This guideline will not be a list of Do’s and Don’ts for Rust code but rather a comparison with the C guidelines and if/how they are applicable to Rust.
/? ' is:issue concurrency: https://github.com/rustfoundation/safety-critical-rust-conso...
rust-secure-code/projects#groups-of-people: https://github.com/rust-secure-code/projects#groups-of-peopl...
Rust book > Chapter 16. Concurrency: https://doc.rust-lang.org/book/ch16-00-concurrency.html
Chapter 19. Unsafe Rust > Unsafe Superpowers: https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html#unsa... :
> You can take five actions in unsafe Rust that you can’t in safe Rust, which we call unsafe superpowers. Those superpowers include the ability to:
"Secure Rust Guidelines" has Chapters on Memory Management, FFI but not yet Concurrency;
04_language.html#panics:
> Common patterns that can cause panics are:
Secure Rust Guidelines > Integer overflows in Rust: https://anssi-fr.github.io/rust-guide/04_language.html#integ... :
> In particular, it should be noted that using debug or release compilation profile changes integer overflow behavior. In debug configuration, overflow cause the termination of the program (panic), whereas in the release configuration the computed value silently wraps around the maximum value that can be stored.
awesome-safety-critical #software-safety-standards: https://awesome-safety-critical.readthedocs.io/en/latest/
westurner
rust-secure-code/projects > Model checkers: https://github.com/rust-secure-code/projects#model-checkers :
Loom: https://docs.rs/loom/latest/loom/ :
> Loom is a model checker for concurrent Rust code. It exhaustively explores the behaviors of code under the C11 memory model, which Rust inherits.
LiamPowell
My broad feelings on many of the issues in Rust, including what's presented here, is that they come from starting with a C-like language as a base. The memory safety and thread safety features in Rust are very impressive, but many other things feel like they're lacking and non-safety features that were added later feel tacked on rather than being a core part of the language.
I feel that if Rust had started with a language like Ada and applied their innovations there then we would have ended up with a much nicer result.
orf
“Don’t let perfect be the enemy of good” - how much of Rust’s success comes from the fact that it started from a C-like base?
Doing it differently might end up with a better result from a purist viewpoint, but I’d wager that adoption would have been far worse.
LiamPowell
Probably true, although I wonder how much comes from acting like C semantically and how much comes from looking like C. If Rust had taken Ada and made it look like C then would it still be so popular?
My guess is that it would be since there's already a steep learning curve for a C developer to pick up Rust. For a developer who's willing to go through all that I don't think a few more new concepts would be a major issue.
estebank
Or it could have killed it on the vine because the syntax was too esoteric and would have pushed the target demographic away before they even tried it. It's hard to test the counter factual in this case.
A common topic of conversation in the rust project is the concept of "weirdness budget": the idea that you can only be so different from what your expected userbase already knows before you become too hard to learn. I don't think you could introduce the borrow checker on a language like Erlang if you're aiming at systems programming. But now you could make a language that is slightly more weird (introducing other features) than Rust when targeting existing Rust programmers.
rcxdude
Rust started with ocaml as a base, then evolved in a more C-like direction later on, mainly as a familiarity with the target programmers thing. It wasn't originally envisioned as the systems language that it became, it was much more high level, with a planned GC and everything, then the lifetimes stuff got developed and the contributers at the time pushed it into more and more control in the hands of the programmer.
tialaramex
> starting with a C-like language as a base
Which C-like language do you believe was the base of Rust?
If you're judging because the syntax looks like a semi-colon language that's just a thin disguise, to make it easier to onboard people from those languages.
LiamPowell
Not a specific C-like language, but that family of languages in general and the design decisions from them:
A number is just a number even if two numbers represent completely incompatible things. If one integer represents a chmod value and one represents a number of files then you can add them together and the compiler will do nothing to stop you even though adding the two is always nonsensical. There's ways around this by creating your own types, but it's not a trivial process. In Ada I can just declare two different numeric types with identical ranges (type A is range 1..200) and the two will be incompatible.
Somewhat related to the above, all array indexes are just numbers. In Ada we can define a type and then use that type as an index of an array type, so if a value is the index type then it must be a valid array index. In Rust if I declare an array as having 5 elements then pass it to a function where I try to access element 6 then nothing will try raise an error at compile time.
Continuing on from the last point, arrays are only indexed by numbers rather than any discrete type. In Ada and enumeration is a valid type to use as an array index, or a range from 5 to 15, or -123 to 7. I'm sure this is something you can do with a generic in Rust, but it's going to be more clunky than having native language support.
Structs are just basic collections of fields. In Ada we have discriminated records that allow for some struct fields which can only be set at instantiation to control things like the number of elements in an another field which is an array. An example of where this could be used is in a ring buffer which is fully contained within a simple struct without the need for extra memory allocation. (I'm aware this conflicts with the other examples about arrays, in short there's a second type of array declaration with a variable subrange as an index). Maybe you can do this with generics in Rust, but it's not as clean, especially if you want to, for example, add a procedure to the ring buffer that takes another ring buffer as a parameter.
These are just off the top of my head as someone who's only briefly looked at Rust, I'm sure there's many more examples. The exact syntax might not match C, but many of the concepts come directly for C and derivatives.
The Ada examples I've given exist in other languages too in various forms, I just happen to be an Ada dev so I know exactly how they work there.
eximius
You can do everything you're saying in Rust.
1. https://docs.rs/dimensioned/latest/dimensioned/
2. https://doc.rust-lang.org/std/ops/trait.Index.html
3. Maybe const generics? e.g., Foo<N: 3> where Foo { array: [u32; N] } or something. You could also do this with less typed-ness with Foo::new_with_capacity(n) and some private size management.
It definitely takes aesthetically from the C-family of languages in the same way that Java and Go are all braces and semicolon languages. I can't exactly minimize this - because I am comfortable with languages that look like this and less comfortable with some languages that don't, so I recognize the effect is very real - but it doesn't affect the features of the language much.
the8472
> Somewhat related to the above, all array indexes are just numbers.
Create your own type[0] encapsulating arrays, and then implement the Index[1] with a custom Idx generic.
> In Ada and enumeration is a valid type to use as an array index, or a range from 5 to 15, or -123 to 7
That's what TFA is about.
[0] https://doc.rust-lang.org/rust-by-example/generics/new_types... [1] https://doc.rust-lang.org/std/ops/trait.Index.html
tialaramex
Well you say "that family" but you only give examples of why Rust isn't Ada.
Is the situation that you consider there are two families of languages, "Ada" and then "All of the other programming languages" and you've decided to label that second group C?
On that basis I agree, Rust has a "C base" as do Fortran, Logo and the Standard ML of New Jersey, but I don't think that's a useful way to understand anything about programming languages.
> In Rust if I declare an array as having 5 elements then pass it to a function where I try to access element 6 then nothing will try raise an error at compile time.
https://rust.godbolt.org/z/4eMTTMar4
Looks like a compile time error to me. I suspect you wrote a function which takes a slice reference not an array. In Rust these types are named &[T] and [T; N] and sure enough we don't know the value of N in a slice because well, it's not part of the type. Ada can't magically know this either, in Ada you've probably been writing an array here, and if that's what you meant you can do that in Rust too with similar effect.
You can't do it in C (the array types do exist in C, but they decay to pointers at the edge of any function, so we can't pass these types between functions) but you can in Rust.
> arrays are only indexed by numbers rather than any discrete type
I guess you're thinking about core::slice::SliceIndex<[T]> ? This is (at least for now and perhaps forever) an unstable trait, so, you're not "allowed" to go implement this in stable Rust, but if you did anyway you can cheerfully implement SliceIndex for your own type, Rust won't barf although you can probably undermine important safety features if you try because none of this is stabilized.
Far from being "only numbers" core::slice::SliceIndex<[T]> is already implemented for the ranges (both kinds) and for a binding pair (lower_bound, upper_bound)
So in terms that maybe seem more obvious to you, we can do foo[(Bound::Unbounded,Bound::Unbounded)] as well as foo[3..=4] and foo[3..] in addition to the obvious foo[3] -- these are all defined on slices rather than arrays though because in practice that's what you actually want and we can just decay the array to a slice during compilation.
Overall I still think it really is the syntax that threw you off.
null
skirge
why Ada didn't take the world? It was literally first programming language taught at university.
pjmlp
Mostly,
- Compiler prices
- The few UNIX vendors that supported it like Sun, it was extra on top of C and C++ compilers, why pay more when C and C++ were already in the box
- Hardware requirements
Still, there are around 7 Ada vendors around.
https://www.ghs.com/products/ada_optimizing_compilers.html
https://www.ptc.com/en/products/developer-tools/apexada
https://www.ddci.com/products_score/
http://www.irvine.com/tech.html
DoingIsLearning
The vendor list is really telling of the issues with Ada's adoption:
- Of my quick scan, only AdaCore supports Ada 2012 (where a lot of the really good stuff is implemented) the rest are stuck on Ada 95.
- None of the vendors seem to list transparent pricing.
If you are only selling based on volume and through a sales rep then you are off the bat excluding most startups, SMEs, and just general bootstrap curious folks.
BSDobelix
The Community version (based on GNAT from the FSF) is free:
https://www.adacore.com/community
But yes GNAT "just" supports Ada 2012, 2005, 95 and 83:
Lucretia9
If the price is not on the website, you can't afford it.
kevlar700
Predicates are great but most of the good stuff including privacy, proper subtyping and abstract data types came with Ada 83. Rust can't hold a candle even to Ada 83 imo.
pjmlp
It works for plenty of other products, but yeah I do conced it could be better.
There are at least two more supporting Ada 2012, if you go into their docs.
firesteelrain
AdaCore does support Ada 95 and this was 7 years ago.
Lucretia9
Your first point cancels out your fourth.
krashidov
I don't know shit about law, but I'm assuming it's not allowed for someone to build their own compiler and make their own business out of the Ada programming language?
Jtsummers
The specification is open, if you want to make your own implementation you can.
touisteur
Why would you assume that ?
wiz21c
Because ADA is maintained by big actors who think ADA is for "mission critical" stuff and not our lowly web apps.
Problem is, web is the new BASIC and many devs will start there and they will see rust first. And where's that ADA game engine ?
ADA can definitely claim tons of successes and very powerful constructs, but mindhsare is clearly not one of its selling points.
throwaway314155
With respect, Rust isn't a great choice for web either. At least, not for web _sites_. I would still argue it's not very good for 90% backend API development either, but that depends on what's being done in the backend.
59nadir
Rust is a bad choice for web and a meh/bad one for game development. It's certainly not good enough at either to have much of a technical edge over Ada.
kevlar700
I think Ada is seen as some esteemed language that only the military and space would have the expertise to use. I had that opinion for maybe a decade but it was very wrong. The other issue was that it is so powerful that compilers had bugs and by the time an affordable open source compiler came along I guess C++ was gaining libraries and the militaries don't release libraries.
The ironic thing is that Ada was designed to be cost effective over a projects lifetime. C costs you a lot further down the line.
pjmlp
One of the reasons of the whole safety hype going on, is that companies have finally start mapping developer salaries, devops and infra costs, to fixing all those CVEs.
aaronmdjones
> I think Ada is seen as some esteemed language that only the military and space would have the expertise to use.
I know Boeing is technically a space company these days, but they weren't when they created the 777. Several of its systems are written in Ada, including the cockpit interfaces, electrical generator systems, and primary flight computers.
ajdude
I think with the recent flurry of languages focusing on safety, Ada has been making a comeback (see: ada-lang.io, getada.dev, alire, etc).
This presentation in particular was in the Ada dev room at FOSDEM (I gave a presentation in that room as well), and there were over 100 people there; we actually ran out of seats in the auditorium.
regularfry
FOSDEM was packed overall. I can't think of a subject track I went to that had spare seats. I noped out of more than one because I just couldn't get in.
Yoric
I gave a presentation in the Quantum Computing track and I couldn't sit down to attend the other presentations :/
pjmlp
Rule number one of FOSDEM, track what you want to see, seat close to the door, and always miss the last five minutes of a talk.
kreetx
There were a few where you could get a spot when arriving late, but, indeed, it was pretty packed overall.
EuAndreh
There are many other factors that influence language popularity besides technical quality, like:
- marketing;
- big companies using it;
- familiarity;
- history of the creators;
- history of the influencing languages;
- timing;
- luck;
- regional usage;
- etc.
Despite some programmers seeing themselves as fully rational making cold decisions, we're like everyone else.the_duke
> - marketing; - big companies using it;
These are the deciding factors.
If you look at which newish languages have gotten popular over the last few years, it was Rust, Kotlin, Swift, Go and Typescript.
Building a language and ecosystem around it takes a huge amount of resources, and often tedious work that doesn't happen if people aren't paid for it.
The street cred of "hey, large company X is using it, it must be good" is also very important.
(of course Swift and Kotlin are somewhat distinct as the platform languages for Android and iOS)
Taikonerd
> The street cred of "hey, large company X is using it, it must be good" is also very important.
Yes, and also, "large company X is spending lots of money on it, so they aren't just going to abandon it once it's no longer the newest, coolest thing."
froh
"first mover advantage" of those who later won?
ADA was way ahead of its time, thus compilers were slow and ressource (RAM) hungry, and worse: they were inaccessible for hobbyists or learners.
In contrast, pascal/turbo pascal was ubiquitous, and then turbo c++. You easily knew someone who could organize a copy and "keys" for it.
jdougan
> It was literally first programming language taught at university.
Do you mean "It was literally first programming language I was taught at university."? because the first language ever taught was more likely to be one of the autocoder/assembly variants, or FORTRAN.
tialaramex
"First language" is generally taken as a term of art in this sector. It is the first language we're teaching students who we expect to learn other languages as well, so emphasis on "first" here unlike for say a "taster" course in another discipline where you're learning only say, Python, with no expectation you will ever learn other languages.
Edited to expand: For a First Language you can choose to pick a language that you don't expect your students will actually end up using, for pedagogic reasons, just as we might spend time proving fundamental things in Mathematics even though those are already proved and you'll never do that "in real life" after studying, a language which has good properties for learning about programming is not necessarily also the right language to actually write yet another web site, database front end, AI chat bot and video streaming service.
I've spent considerable time thinking about this and I believe Oxford and Cambridge were right to choose an ML as First Language. The MLs have desirable properties for teaching, even if you expect your students to end up writing Python or C++ after they graduate. I am entirely certain that my exposure to an ML at University made it much easier to pick up Rust than it was for people whose nearest previous languages were C and C++
Tor3
It's indeed hard to imagine that the first programming language taught at any university would be Ada. That would at least mean that the university started teaching programming and computer science very late. There's been a number of main programming languages taught over the years. Back in the late seventies/early eighties, some universities in my region used Simula in their programming courses, for example.
mkl
Agreed. My mum learned basic Fortran at university in the early 1970s, before Ada existed. (It was done on punch cards, and they had to wait a day or so to find out if their programs worked!)
guerby
Many factors but one is interesting: the existence of a public test suite, ACATS http://www.ada-auth.org/acats.html
This is a good thing to have a test suite for a language but from a business perspective it increases barrier to entry, why? 1/ you start your new compiler with 10000 bugs (the failing tests in the public test suite) 2/ you get no client since clients want a compiler passing the public test suite 3/ no client means no money and this until you fix the 10000 bugs.
With programming languages that do not have a credible public test suite you can get away with shipping the compiler ASAP and get money from customers, then concentrate on fixing customer impacting bugs.
All in all a blessing and a curse, life is full of compromises :)
weinzierl
I am always confused about the terminology. I know RangeTypes or RangedTypes from Pascal, but I think in Rust they are something else. The talk mentions SubTypes in the ADA context which I know from an OO context, but again it seems to be different. Then there are Refinement Types which seem to be more powerful but subsume the others. And now we also have Pattern Types.
Can someone bring order in these concepts?
Lucretia9
Ada has ranges and subtypes.
type Angles is 0 .. 360;
subtype Acute_Angles is range Angles'First .. 90;
Subtypes can be used with the parent type without conversions.Pascal only has subranges, iirc.
runekaagaard
I'm often wondering about if an elixir-like language for Ada could make it more popular.
Lucretia9
FYI, re the ranges in rust, you can do a range minus 10 in Ada, I use it in my SDL2 bindings.
I didn't watch the video but I read the pdf transcript. I noticed that the contract example (if x > 50 then x+50 > 100) can fail because of integer overflow. This is an area that Ada seems to take much more seriously than Rust does.
Anyone know what happened with Adacore and Ferrocene? Are they no longer working together? It sounded like a good collaboration earlier on, given the Rust juggernaut.
Also I notice no mention of anything like SPARK for Rust.
I still feel like Rust and Ada are designed for differing domains. The archetypal Ada app in particular might malloc some memory (and possibly fail) during an initialization phase, but post-initialization, must never fail, which for among other things basically says never use malloc. The post initialization part is basically a control loop using those fixed buffers to keep a jet engine spinning or whatever.
Rust's archetype application on the other hand is a web browser: tons of dynamic allocation, possible memory exhaustion depending on what the user tries to do, and the requirement is to never fail ungracefully, as opposed to never failing at all. "Never fail at all" is not exactly more stringent or complicated: it just means you're not allowed to even attempt certain things, because they might fail.