One document about Go

bearophile bearophileHUGS at lycos.com
Tue Jun 1 12:48:11 PDT 2010


Alex Makhotin:
> Current DMD compiler version outputs on attempt to make empty statement:
> > use '{ }' for an empty statement, not a ';'
> Is there a reason?

Yes, it avoids a common type of bug:

for (int i = 0; i < 10; i++);
  writeln(i);

I have seen students waste minutes locating that bug.

Bye,
bearophile


More information about the Digitalmars-d mailing list