Google's Go & Exceptions

Nick Sabalausky a at a.a
Sat Jan 30 23:31:11 PST 2010


"John D" <jdean at googling.com> wrote in message 
news:hk33sm$186d$1 at digitalmars.com...
>
> "Walter Bright" <newshound1 at digitalmars.com> wrote in message 
> news:hk1uso$1omt$2 at digitalmars.com...
>> John D wrote:
>>> Commonly called "2 step construction". But you forgot to add the check 
>>> on the return val from c.create().
>>
>> No need to - c.create() should throw if it fails.
>>
>
> What's the point of doing 2-step construction if not to avoid exceptions?
>

To avoid having a constructor that throws exceptions...Although I still fail 
to see how it's useful to avoid that in D. 





More information about the Digitalmars-d mailing list