Comment by owlstuffing
16 days ago
That strategy will backfire when the grammar changes in a later release. A pre-parse step is necessary for code that targets different compiler releases.
16 days ago
That strategy will backfire when the grammar changes in a later release. A pre-parse step is necessary for code that targets different compiler releases.
Now I'm confused, what do you mean? What grammar changes?
Imagine v2.0 introduces a new feature that requires a parser change—one that v1.0 wouldn't be able to parse.
This is also an issue if a future version of C3 introduces language level support, allowing newer compilers to compile code as if it were written for an earlier version. While this approach works well when teams standardize on a specific version’s feature set, they may still want to take advantage of performance improvements in the latest compiler.
That said, this is a niche case and not something I’d consider a dealbreaker.
You don't need an ifdef.
You just need a CLI option like java's --source, where you specify the source compatibility with different language versions.
3 replies →
Ah, that is indeed true. However, the plan is to have the language fixed at 1.0, only updating stdlib and tooling after that.
3 replies →