Single-file Ada 83 LLVM compiler

5 pointsposted 10 hours ago
by roger23

5 Comments

Rochus

an hour ago

Wow, this is incredible. What are you doing with it? Looks like a year of work.

andsoitis

10 hours ago

Why Ada 83 instead of Ada 2022? The former is 40 years old.

roger23

10 hours ago

Because its a smaller subset of the language, easier to implement as a first step. I plan to add worthwhile features to the language from future revisions not requiring tagged types which have largely been seen as a design mistake since Ada 95.

For example, Ada 83 had in its standard controlled lifetime (e.g. contructors and destructors) as well as garbage collection, but they were never implemented by anyone and dropped.

andsoitis

10 hours ago

Any plans for inheritance and polymorphism, given your reluctance towards tagged types?

roger23

9 hours ago

There is no need really - there will be things like aspects, dot-notation for inout first parameter, if and case expressions, protected-types, etc.

I could get into something called "co-extensions" which have existed in the language standard from 2005 I believe and allowed for access discriminants to be tracked and automatically freed, and I think this would solve the remaining gap - NOTE GNAT does not implement this and actually whiffs a bit on the ACATS last I checked