The empty statement ";" - when is it useful?

KennyTM~ kennytm at gmail.com
Sat Jul 25 11:30:56 PDT 2009


Andrei Alexandrescu wrote:
> D has ";" as the empty statement. In fact I think it's an empty 
> declaration because it can appear at top level.
> 
> When is it any good? The only place I can think of is after a label
> 
> blah: ;
> 
> But then you can always say
> 
> blah: {}
> 
> which is arguably less puzzling. Any other places?
> 
> 
> Andrei


for (; cond; inc) { ... }


or as the result of a string mixin?



More information about the Digitalmars-d mailing list