On 20/04/2012 01:53, Andrej Mitrovic wrote:
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.

This does seem to be a total contradiction of the principle that's stated elsewhere in the D spec that variables are always initialised.

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.
"
<snip>

Why do you want to be able to declare local variables and then never use them?

Stewart.

Reply via email to