Article about problems & suggestions for D 2.0

dsimcha dsimcha at yahoo.com
Sun Aug 28 14:31:09 PDT 2011


On 8/28/2011 5:18 PM, Mafi wrote:
>> dynamicCast: Cast a class to another. This should throw something
>> derived from Error (not Exception) on failure instead of just returning
>> null. If you want null, just use the cast operator. Maybe we should
>> change its name, though. How about checkedCast or downCast?
>
> I think, to!someClass(x) works like you want dynamic cast to work.

(Slaps self in forehead.)  You're right, I forgot about that.  Never mind.


More information about the Digitalmars-d mailing list