"foobar" <[email protected]> wrote in message 
news:[email protected]...
> On Monday, 20 February 2012 at 20:18:58 UTC, Nick Sabalausky wrote:
>> "foobar" <[email protected]> wrote in message
>> news:[email protected]...
>>>
>>> I meant -
>>> what's the benefit of:
>>> throw createEx!AcmeException("....");
>>> vs.
>>> throw new AcmeException("....");
>>>
>>
>> Fixed.
>
> Huh? <confused>
>

You forgot the "new" in the second example. I make that mistake in my own 
code all the time :)

>
> I just want to add to the above valid points one comment:
> instead of the proposed inheritCtors D could e perhaps modified to make 
> ctors more uniform with other methods. ctors could be automatically 
> inherited if sub class does not define its own ctors and does not add new 
> fields.
>
> the above would simply become:
>
> class AcmeException : Exception {} // inherits super ctors automatically
>

I often forget that doesn't already happen. I think what confuses me is that 
non-inherited classes implicitly define "this(){}" if there's no other ctors 
(Which is very handy though. Haxe doesn't do that which I always find 
irritating).


Reply via email to