Should we warn if we detect null derefernces or void value uses ?
ketmar via Digitalmars-d
digitalmars-d at puremagic.com
Tue Dec 6 23:18:51 PST 2016
On Wednesday, 7 December 2016 at 06:47:56 UTC, burjui wrote:
> Yes, but we should issue an error, like Andrei said. A language
> is only as useful as it's best implementation, so diagnostics
> like that are essential. Data-flow analysis shouldn't even be
> optional or lacking in any modern compiler.
you know, D has variable initialization with default values. that
allows to skip DFA, and still be sure that variable is
initialized.
also, that thing can be done in *backend*, if it is really
necessary, along with eliminating needless loads. such
warning/error absolutely unnecessary in frontend, it only adds
more code to maintain, and slows down compiling.
More information about the Digitalmars-d
mailing list