try/catch idiom in std.datetime

Walter Bright newshound2 at digitalmars.com
Mon Nov 18 12:20:40 PST 2013


On 11/18/2013 11:44 AM, Andrei Alexandrescu wrote:
> Here, again, we have a nothrow constructor call a more general one, which may
> throw in general. The intent - maximizing internal reuse through forwarding - is
> noble. The realization - it takes more code to reuse than to just set the
> blessed variables - is a corruption of the noble goal.

I also have a design issue with having throwing constructors at all. I know D 
allows them, but I consider it a bad practice.


More information about the Digitalmars-d mailing list