Dicebot on leaving D: It is anarchy driven development in all its glory.

Walter Bright newshound2 at digitalmars.com
Thu Aug 30 23:03:57 UTC 2018


On 8/25/2018 4:49 PM, Nicholas Wilson wrote:
> Run semantic3 on the constructor independent of the requirement to destruct 
> already constructed objects. If the constructors is nothrow then there is no 
> need to have the destructors run or the eh code at all, because no Exceptions 
> can be thrown (an Error may be thrown but that will kill the program). This is 
> how I intend to fix it after I refactor semantic3.

A function can be made nothrow by:

     try {
        ....
     } catch (Exception e) {
        ... handle it locally ...
     }

Also, your proposal is ignoring the destructors, which is literally what the 
compiler does now.



More information about the Digitalmars-d mailing list