News for hackers. Stuff that matters.
Re:Ada and SPARK enter the automotive ISO-26262 market with ... by pjmlp on Thursday June 05, 2025 @02:36AM (#44188928)
Less ChatGPT and more language reference manuals, ChatGPT isn't an ancient oracle knows it all, even though Microsoft's marketing sells it as such.

Ada has as much zero cost abstractions as C++ and Rust have, and one of the reasons of Ravenscar is even what to turn off for bare metal deployments, and real time OS deployments.

Re:Ada and SPARK enter the automotive ISO-26262 market with ... by Ygg2 on Thursday June 05, 2025 @04:07AM (#44189479)
To be fair to ChatGPT, trying to find good documentation for Ada +/- Spark hasn't been quite as smooth sailing as trying to find something for C++.

> Ada has as much zero cost abstractions as C++ and Rust have.

Couldn't find anything about it (see above), but does Ada come with any monomorphization tricks?

Re:Ada and SPARK enter the automotive ISO-26262 market with ... by pjmlp on Thursday June 05, 2025 @06:30AM (#44190242)
What does that to do with zero cost abstractions as described originally by Bjarne Stroustroup?

The way generics are implemented in Ada compilers is implementation specific.

Re:Ada and SPARK enter the automotive ISO-26262 market with ... by Ygg2 on Thursday June 05, 2025 @10:30AM (#44192078)
How exactly are you going to implement generics in a way that's:

> What you don’t use, you don’t pay for. And further: What you do use, you couldn’t hand code any better.

without monomorphizing the generics?

Re:Ada and SPARK enter the automotive ISO-26262 market with ... by pjmlp on Thursday June 05, 2025 @01:46PM (#44193956)
By letting the compilers decide the best way to implement them.

Also I find funny this point of view on Ada, given the poor examples WG21 has added into the C++ standard library, that will never be fixed due to never-ending ABI drama.

Re:Ada and SPARK enter the automotive ISO-26262 market with ... by Ygg2 on Thursday June 05, 2025 @02:19PM (#44194259)
Look. I'm not against Ada. Not my favorite language but definitely huge step in the right direction.

With that said. How does:

> By letting the compilers decide the best way to implement them.

Get you to zero cost generics. What if implementor just says "let them eat memory" and boxes the generic.

Re:Ada and SPARK enter the automotive ISO-26262 market with ... by pjmlp on Thursday June 05, 2025 @02:39PM (#44194491)
By the same way std::regexp gives you zero cost abstractions in handling regular expressions in C++.
Re:Ada and SPARK enter the automotive ISO-26262 market with ... by anthk on Thursday June 05, 2025 @03:32AM (#44189279)
Seriously, if these people use ChatGPT to seek new knowledge, we are doomed. They are utterly clueless.