Hacker News new | past | comments | ask | show | jobs | submit login

I've always wondered if it was in part because porting an ADA compiler ideally also involves porting some support for constructs like TASK - which ends up more like getting maintenance in place for both a language compiler as well as OS elements. In comparison porting a C compiler is mostly about the instruction set, and you can separately decide to port/support thread libs or selected RTOSes.

It's been a long time since I programmed in ADA, but the TASK support on the toolchain/system I was a long time ago sucked, and you couldn't climb into it and fix it like you might a standalone C RTOS because it was part of the tooling supplied by a vendor.

Vs with Rust, the borrow checker is fairly portable memory lifetime tracking and reasonably independent of hw architectures.




At least with GNAT, it isn't that bad - you don't have to port support for tasking when targeting an architecture or OS - e.g. there's it supports bare-metal on many ARM boards, the runtime+glue needed is not much more than for a C compiler


I don't think so, there were already other languages, like e.g. Modula-2 with similar features built-in (processes, semaphores and co-routines).

For me there were two main reasons:

1 - the cost of getting a commercial Ada compiler, much more expensive than most alternatives

2 - initially many though that Ada compilers would be extremely costly to implement. Ironically, C++ compilers are way more complex to implement than Ada ones.


> way more complex

As somebody who works on an Ada compiler, I'm not sure about that.

On some levels, Ada has a better design which simplifies compiler implementation.

On some others, the RM spec is extremely complicated - in my opinion because it was specified before it was implemented, and because of the need for safety - and very hard to implement.

See for example, dynamic access check, pool specific controlled types, anything related to elaboration, build in place for limited types, etc ..


Well at first almost everyone seemed to have thought it had to be complex to write an Ada compiler. It wasn't until the Robert Dewar talked (for some time) with Richard Stallman that he saw à way to drastically simplify the implementation of an Ada compiler.

This story and hommage by dwheeler https://www.dwheeler.com/essays/make-it-simple-dewar.html was one of the nicest things written on the late Robert Dewar... and on RMS !

The GNAT Front End is a large and complex piece of software and the language is very powerful thanks to all the features packed in the compiler.

On the other hand, for compliance with the standard there is a complete test suite : ACATS... It should help...


At least that is my general impression, that the way C++ evolved, many of its features are way more complex to implement than Ada ones.

The context dependent grammar, lookup rules, ODR, SFINAE, all the semantic interactions of template meta-programming,...

Then again that is just my perception.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: