Live data from Hacker News

Giving Ada a Chance

ajxs.me

91–100 of 261 posts

Re: Giving Ada a Chance

#91

No mention of FAA's DO-178C or Green Hills Integrity-178 RTOS? Green Hills's IDE is named after Ada[1]. [1] https://ghs.com/products/AdaMULTI_IDE.html

RTCA DO-178 is language agnostic.

Re: Giving Ada a Chance

#92
post #85

I love Ada, unfortunately it’s real world use seems to be relegated to old legacy code. I’d like to use it a little more on the side, but I also need to keep my priorities focused on realism, which sadly means ignoring Ada and learning something like C++ which seems unapproachable from any angle. Ada also seems to have a weirdly negative rep in many circles it seems. I recall looking around for an Ada compiler for a…

From my experience, it still gets a lot of use in aerospace and defence companies. Outside of those industries I can't think of people even mentioning it really, but again probably biases abound. Skimming my local jobs list(SE England) I see new listings from both Airbus and BAE Systems looking for Ada developers in the past week.

Yeah but I wonder how much of that is new development or code from the 80s-80s they’re wanting to port to C or C++

Re: Giving Ada a Chance

#93
post #34

In answer to what appears to be a misunderstanding about Rust: > Its foreign function interface seems particularly poorly implemented. The official Rust documentation suggests the use of the external third-party libc library (called a 'crate' in Rust parlance) to provide the type definitions necessary to interface with C programs. As of the time of writing, this crate has had 95 releases. Contrast this with Ada’s Int…

> the former is provided by the bitflags crate: https://crates.io/crates/bitflags

The linked crate appears to implement an unrelated feature. c2rust-bitfields [0] or rust-bitfield [1] might be better examples.

Rust's working on adding native support for bitfields, but it seems that that might be a while out at this time [2, 3]

[0]: https://crates.io/crates/c2rust-bitfields

[1]: https://github.com/dzamlo/rust-bitfield

[2]: https://github.com/rust-lang/rfcs/issues/314

[3]: https://github.com/rust-lang/rfcs/pull/3064

Re: Giving Ada a Chance

#94
post #3

This was a good read. I instantly recognized the title of the textbook that is mentioned in the blogpost? I own it! Having a background in C, I went back and forth with Ada for years, without really jumping all in. In the last couple years in particular, with the growing popularity of Rust, I started to renew my interest. I'm reminded of a popular reddit thread on r/Ada-- someone called Rust a "toy language", which p…

Is Unchecked_Deallocation still necessary? If so, then it is hard for me to take seriously any claims of Ada's safety.

Re: Giving Ada a Chance

#95
post #39

> I can’t help but think that complicated programming paradigms would seem more intuitive to beginners if taught through Ada instead of C and its derivative languages, as is common in computer science and engineering faculties worldwide. At my university, the first courses you took in CS used Ada. I think it was a really good choice but I was in the minority I guess because after my year they switched to either using…

> after my year they switched to either using Java or Python They do this because of intense negative feedback from students who don't like having to learn languages for which there is no job market.

I'm not sure this was the case for us, there were plenty of other courses in the major that involved both widely used language and more niche ones.

I think it was more that we didn't have enough professors who were bought-in to Ada to handle the volume of students in those initial courses. The professor who used to teach all the intro courses (and was the biggest advocate for Ada there) became the department chair and let other people take over those courses so he could focus what time he had on some of the upper level courses. Pretty sure they still use Ada in their concurrent programming course too.

Edit: Got curious and I think this is all the languages I used as part of an undergrad CS degree in approximately the order I first used them:

Ada, Racket, C, Make, x86 ASM, Java, Bash, batch script, PHP, JavaScript, MySql, Python 2, Inform 7, Blender Game Engine visual scripting, ICON, Lua, Erlang, and ROBOTC

I'm honestly surprised how much variety there was despite the only academic language being Racket.

Re: Giving Ada a Chance

#97
post #55

Earlier quoted context omitted.

> I just wonder why Ada didn't get the credit it deserved as being absolutely bulletproof It's not. All languages make trade-offs in the performance-convenience-safety-etc space, and Ada's choice is not "100% safety". It lacks memory safety and has holes in its type system: https://www.enyo.de/fw/notes/ada-type-safety.html

I wouldn't say Ada lacks memory safety. It doesn't go for 100%-in-all-cases but neither does Rust. The main differences are that it doesn't do memory safety by default (which is significant), and also treats memory safety with less granularity. Aside from simply making manual memory management less frequent (with things like variably sized arrays), it has memory pools and subpools to handle more large-scale memory sa…

I think it’s time we start expecting 100% memory safety as table stakes, because any flaws are catastrophic. Moore’s Law has more than paid for it; Android could run an animated display and a Bluetooth stack in a wristwatch seven years ago.

Re: Giving Ada a Chance

#98

I really like Ada's ranged types (VHDL has them also - it inherited them from Ada). You can say: type OperatingTemp is range 33 .. 90; And then declare variables of that type and they will be range checked - an exception will be thrown if the variable goes out of that range. Wish more languages had this feature.

In JavaScript it is possible to define getter and setter method of an object. So this behaviour can be emulated by adding a validation in the setter method. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... In Java too, don’t know about other languages though...

In JavaScript it is possible to define getter and setter method of an object

If a civil engineer had access to concrete but he chose to build with mashed potato instead he would be considered insane. Yet programmers with access to Ada choose JavaScript and it's considered perfectly normal.

Re: Giving Ada a Chance

#99
post #3

This was a good read. I instantly recognized the title of the textbook that is mentioned in the blogpost? I own it! Having a background in C, I went back and forth with Ada for years, without really jumping all in. In the last couple years in particular, with the growing popularity of Rust, I started to renew my interest. I'm reminded of a popular reddit thread on r/Ada-- someone called Rust a "toy language", which p…

[deleted]

Re: Giving Ada a Chance

#100
post #67

Earlier quoted context omitted.

I am not sure if this is still the case today, but Computer Engineering in EE Department used to teach Pascal / Ada / C as the first programming language. With the expectation that making a program to compile correctly is hard. Before you move off to something like Perl / Java / Python. While in CS they tends to start to Python or Java. And you start learning all the OO, Procedure or whatever paradigm before going in…

I feel this. My CS program was in Java. After a few years in industry, I believe that CS should start with either C or Scheme. C to teach you about real machines, Scheme to ignore the machine and do math (algorithms).

I get what you're saying, but learning C teaches you about the C memory model instead of "real machines". C was designed for portability across different architectures and, believe it or not, was considered high-level and abstract at one time.

But I agree that learning C is valuable because I believe that learning about manual memory management is valuable.

Post reply on HN