My new favorite D feature

Tim Keating holyspamster at gmail.com
Tue Dec 19 19:25:49 PST 2006


At least for then next couple of hours, anyway:

	int i = 100;

	if (i = 2);
	{
		writefln("We shouldn't be here");
	}

Yields:

	use '{ }' for an empty statement, not a ';'

Instead of blithely steping into that block. As just happened in my C++ 
program, wasting 30 minutes of my life while I tried to figure out why 
the heck that block kept getting executed.

TK



More information about the Digitalmars-d mailing list