DMD 1.027 and 2.011 releases
    Robert Fraser 
    fraserofthenight at gmail.com
       
    Fri Feb 22 15:19:33 PST 2008
    
    
  
Sönke Ludwig wrote:
> Manfred Nowak schrieb:
>> Walter Bright wrote:
>>
>>> Don't have to compute it, just check it since it's part of the type 
>>> signature.
>>
>> Enforcing, checking but not computing? I don't get that. So I'll have 
>> to wait for the docs for "nothrow".
>>
>> -manfred
>>
> 
> If you specify that some function does not throw an exception, you can 
> enforce
> that simply by disallowing the use of "throw", as well as the use of any
> function which does not specify "nothrow" inside of the function. I'd guess
> thats how it's supposed to work.
> 
> With this system, there would of course be some functions, which could 
> never
> throw an exception, but are not allowed to carry the nothrow flag, however
> (i.e. a function which catches all the exceptions of all used functions).
According to the conference slides, it'll allow any function that just 
has a "catch exception". It does indeed support catches (i.e. the 
function itself can set up exception handlers, but callers needn't).
Also be aware that "new" throws exceptions if there's no memory left.
    
    
More information about the Digitalmars-d-announce
mailing list