Editions: What about Compiler Plugins?

libxmoc libxmoc at gmail.com
Wed Mar 11 10:12:53 UTC 2026


The recent discussions around D Editions and Walter's call to 
drop legacy features (like -revert=intpromote, complex numbers, 
or even lazy and alias this (i like alias this `:'(`)) highlight 
a recurring problem: the D compiler does too much stuff.

Simultaneously, we have ongoing debates about half implemented 
concepts like @live. As Rikki and Timon's recent exchange pointed 
out, D is stuck in a weird middle ground. It is trying to 
hardcode highly complex, paradigm-shifting semantics (like Rust 
inspired borrow checking) directly into the core compiler 
frontend, which results in confusion, incomplete implementations, 
and ever growing @ soup.

Instead of just treating Editions as a garbage collection (pun 
intended) pass for old features, has anyone on the team explored 
opening up the compiler with a Plugin API?

If the AST and semantic analysis phases were exposed via a stable 
API, we could change how D evolves. Rather than bloating DMD, 
arguing over which features deserve to exist and which deserve 
the die, we could strip the core language down to a minimalist 
base for the next Edition and offload the rest to the community.



More information about the Digitalmars-d mailing list