I hate class destructors with a burning passion

Kagamin spam at here.lot
Thu Jun 10 12:07:34 UTC 2021


On Wednesday, 9 June 2021 at 17:54:06 UTC, Timon Gehr wrote:
> On 09.06.21 04:37, Walter Bright wrote:
>> 
>> Allocating via the GC is in assert is just ridiculous, as the 
>> program is going to exit shortly anyway. There won't ever be a 
>> need to run a collection on it. Just malloc away and 
>> fuggeddabootet.
>
> AssertError is still *caught* /by the language/ on in contract 
> inheritance.

I'd say, lower assert failures in contracts to a different 
function, say, _d_contractFailed(), which can do a different 
thing, say, throw ContractError, and child contract can catch 
only this specific ContractError instead of any Error.


More information about the Digitalmars-d mailing list