Docs: Section on local variables

Andrej Mitrovic andrej.mitrovich at gmail.com
Thu Apr 19 17:53:25 PDT 2012


Can I remove this section from the D docs, in functions? :

"
Local Variables
It is an error to use a local variable without first assigning it a
value. The implementation may not always be able to detect these
cases. Other language compilers sometimes issue a warning for this,
but since it is always a bug, it should be an error.

It is an error to declare a local variable that is never referred to.
Dead variables, like anachronistic dead code, are just a source of
confusion for maintenance programmers.
"

I don't think this will ever be implemented, or that it should be for
that matter.


More information about the Digitalmars-d-learn mailing list