Hacker News

tosh
Ada 2022 adaic.org

Danidada6 hours ago

In case anyone is curious about an overview of the actual changes: http://www.ada-auth.org/standards/22over/html/Ov22-TOC.html

rustyhancock7 hours ago

My understanding is that most of Adas users are maintaining legacy systems.

It'd be great to hear from anyone who is using it today by choice.

Linux-Fan6 hours ago

After some search for programming languages which promise to reduce the number of bugs, I decided to give Ada (2012) a try.

I like it better than C and C++ and the compiler is included in Debian in a reasonably recent version that it can compile the code that I need.

Ada is particularly nice for programming RPI 2040 microcontrollers because for my needs I didn't need additional libraries. For both of my RPI 2040 projects (one of which is online here: https://masysma.net/37/dcf77_vfd_raspi_clock.xhtml), my code had fewer bugs than I had anticipated.

For general purpose systems programming the lack of free software libraries is still a concern e.g. while working on a custom backup restore program I had to write my own LZ4 extractor and Blake3 hash function implementation because there wasn't any existing libraries that I could find for the purpose.

RavSS19 minutes ago

I've used it in my personal hobby projects for several years now, Ada/SPARK is a favourite language of mine. It's not a legacy language and it has features which I wish mainstream languages would have, particularly regarding the formal verification utilities of SPARK. It's also great for bare metal development.

I've not managed to convince anyone else to use it, as most are discouraged by either its Pascal-style "verbose" syntax on first glance or its general lack of third-party libraries (relative to something like Rust's ecosystem). Anyone who can get past those aspects should really give it a try.

jmccaf6 hours ago

My workplace uses Ada SPARK for high-integrity automotive software, ported from C or C++. IIUC, the contracts and static proofs can replace some activities like isolated unit tests for C++ .

https://www.wevolver.com/article/nvidia-adoption-of-spark-us...

ajxs5 hours ago

I use Ada for a lot of projects where C would otherwise be the default language of choice. I find that I spend much less time getting tied up debugging silly errors. In a lot of cases, Ada makes it difficult to do things the wrong way. When I move from working in C to Ada, there isn't much I miss, but when I move the other way around, I feel like I'm missing so much!

gte525u3 hours ago

We used it for a new Defense/Aerospace projects. Language-wise it's fine although verbose. Intent was to separate similar IP so there was no claim of cross contamination. Built-in threading and a robust standard library is nice.

Tool-wise - refactoring was a bit of a pain.

ajxsan hour ago

> Tool-wise - refactoring was a bit of a pain.

Could you share what tools you were using, and what you felt was missing? I write Ada in vscode, because it's what I use in my dayjob. AdaCore's plugin has good language support^1, but I don't use it for much other than formatting, or expect sophisticated automated refactoring functionality from it.

^1: It's still missing support for some Ada202x features. I can't wait for it to support `return when...`.

docandrew37 minutes ago

I use it for many of my side projects. I just like the language, the strong typing fits well with my work.

metalliqaz6 hours ago

The Ada stronghold is aerospace and defense systems. So these may or may not be legacy systems, but they are safety-critical or mission-critical systems that rely on long standing well defined development processes. That inflexibility means that advancements in the technology are very slow to creep into usage. That goes not only for the languages/compilers but also the silicon and everything in between.

krior6 hours ago

The same can be said for Cobol and its relarionship with banking, but you will struggle to find anyone not categorizing cobol as legacy.

metalliqaz6 hours ago

I'm not in banking so I don't know if banks write new business logic with Cobol or merely maintain existing systems. I would be very surprised, though, if modern web-based products are using Cobol, or fancy high-speed trading platforms, or big data-driven machine learning, etc.

jibal4 hours ago

That's quite the non sequitur. The relationship you mention isn't why COBOL is legacy.

johnisgood6 hours ago

If you want to learn Ada / SPARK, try https://learn.adacore.com/index.html.

rubyrfranklin23 hours ago

[dead]

phplovesong6 hours ago

Many ada devs probably write software i would not be comfortable writing. Its always been a kind of place i dont want to be part of.

sam_bristow6 hours ago

Assuming your discomfort is around the defense side of things here's an example of a diving reberather system using Spark/Ada from a while back.

https://youtu.be/zL9vVs5vHuQ?si=-thG-FkelkW6oFfb

Jtsummers4 hours ago

It's used for planes, trains, and automobiles. No reason to feel uncomfortable working on those things.

zardo6 hours ago

I wonder what Ada Lovelace would think about her namesake being the language for weapon systems.

graemep6 hours ago

She was an aristocrat in the greatest empire the world had ever seen. She is unlikely to have objected to weapons systems per se.

zorobo6 hours ago

I’d rather fly in an airplane with a system coded in Ada/Spark rather than Python ¯\_(ツ)_/¯

homarp6 hours ago

you have problem with Snakes in a plane ?

[deleted]6 hours agocollapsed

melon_tusk5 hours ago

[flagged]

antiquark2 hours ago

Ada doesn't even have a "++" operator to increment a number. SAD!

hn-front (c) 2024 voximity
source