On Tuesday, 26 November 2013 at 08:23:15 UTC, bearophile wrote:
Chris Cain:
If you really want to know when something is global when you
use it then use g prepended before your global names. That's
what a lot of people do to avoid this type of issue.
That is named "relying on hand-managed name conventions for
something that could be the job of the compiler type system".
Yes, exactly.
BTW, yesterday I found bug in Vibe.d, see:
https://github.com/rejectedsoftware/vibe.d/issues/406
Reduced example:
void main()
{
int i;
i = i;
}
The line `i = i;` does nothing, but compiler doesn't give a
error. Why?!
Note that `i;` line gives the error:
Error: var has no effect in expression (i)