bearophile wrote:
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.

I've seen a whole afternoon lost on that one.

Reply via email to