DIP65: Fixing Exception Handling Syntax

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 17 03:38:58 PDT 2014


"Dicebot"  wrote in message news:dikroykmroruujndliin at forum.dlang.org...

> It is used 0 times in Phobos. In fact I have not seen it used for a single 
> time in any living project - guess because any sane person understands how 
> terrible of a misfeature it is.

I've used it, because I'm lazy.

Usually something like:

int x = 0;
bool xisaninteger;
try
{
   x = to!int(args[2]);
   xisaninteger = true;
}
catch
{
}

Sure, there are better ways to do it, but I don't care when I'm writing a 
quick script.

You will break some code if you disallow it.  Personally I don't mind, but 
it's not up to me. 



More information about the Digitalmars-d mailing list