Google's Go & Exceptions

Nick Sabalausky a at a.a
Sun Jan 31 02:02:01 PST 2010


"John D" <jdean at googling.com> wrote in message 
news:hk3f9m$1t0f$1 at digitalmars.com...
>
> "Walter Bright" <newshound1 at digitalmars.com> wrote in message 
> news:hk3bld$1k1q$2 at digitalmars.com...
>> John D wrote:
>>> "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?
>>
>> It's so the default initialization cannot fail, which is handy in cases 
>> where dealing with failure is problematic.
>
> Pffft.  Said the backend compiler writer. So let it be written.
>

Why are you even here?





More information about the Digitalmars-d mailing list