goto a no-go?

Nick Treleaven ntrel-public at yahoo.co.uk
Wed Oct 2 08:22:48 PDT 2013


On 01/10/2013 13:36, monarch_dodra wrote:
> I guess I can always use the "do{}while(false);" pattern, but I actually
> find it *more* confusing (IMO)

Although it might not get used that often, it might be nice if D allowed 
omitting the 'while(false)' part, just using a semi-colon for 'do' 
termination:

do {
   ...
   if (cond) break; // exit do
   ...
   // implicit fall through, no looping unless 'continue' is used
};



More information about the Digitalmars-d mailing list