Single-file Ada 83 LLVM compiler

(github.com)

4 points | by roger23 9 hours ago ago

4 comments

  • andsoitis 9 hours ago ago

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

    • roger23 8 hours ago 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 8 hours ago ago

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

        • roger23 8 hours ago 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