Why use a DFA instead of DIP1000?
Walter Bright
newshound2 at digitalmars.com
Sun Sep 14 03:20:50 UTC 2025
Requiring the language to remove all dead code before checking for errors means
the entire program must be subjected to DFA. The result is compilation will slow
down dramatically. It means separate compilation is no longer possible.
As a pragmatic choice, D is designed to not require DFA. It is a deliberate
architectural choice, not a bug.
That said, an optional DFA can be quite useful in detecting otherwise hidden
programming errors. But I'm not convinced it's a good idea to require it in
order to successfully compile code, as your opening example suggests.
More information about the Digitalmars-d
mailing list