safer casts - take II

BCS ao at pathlink.com
Tue May 13 13:44:06 PDT 2008


Reply to terranium,

> BCS Wrote:
> 
>> for delegates to work
>> 
> yes, delegates sould be static functions or member calls
> 

delegates can't be static functions (function pointers can) and member calls 
wouldn't give me access to local variables.

even if all that is addressed, the best implementation of your proposal is 
a lot more hackish than 

if(auto a = cast(A)b) ...





More information about the Digitalmars-d mailing list