by ducktective · 3y ago · 0 comments
Why not support old features of the language in the new version of the compiler/interpreter? This seems to be particularly feasible in Lisp/Scheme family of languages due to the fact that ASTs are edited directly in source code.
For example, each library declares its target version of the compiler, then newer compiler first translates the library to new syntax, then integrates it with other dependencies.
What's wrong with this line of thought?
So let's assume there was wide spread consensus that it's a terrible idea and it should work like every other programming language. There is really no obvious way to simply "convert to the new syntax"? And trying to have "go with nil interfaces" library interact with "go with normal type system" would be it's own can of worms.
Like in this case, the only realistic path I could see would be you deprecate it, then you start warning, and then in like 10 years or something you fully remove it?
For the "more": you can do it not only for other dialects of the same language, but also for very different languages. And often to make them interoperable between languages.
(For one simple example, long ago I made a fairly simple `#lang sicp` that translates the old dialect of MIT Scheme used by the SICP book, to Racket, using some simple syntax transformation and the module system.)
Sometimes there is really no substitute for getting things right from the start.
I thought it would be possible to deterministically translate R^(n-1)RS to R^(n)RS