rtti cast

BCS ao at pathlink.com
Thu May 8 09:49:28 PDT 2008


Reply to terranium,

> BCS Wrote:
> 
>> Thinking about it, I can't recall ever casting to a derived type
>> where a failed cast was an indication of a bug.
>> 
> You can't, others can.

Ok, some some people use then one way, I use them another. That doesn't prove 
that they your proposal is better (or worse) than the current way.

> When a function receives unexpected input it's
> a bug.
> 

That's irrelevant. What I'm saying is that in every case I know of where 
I have used such a cast, the cast failing was /not/ unexpected. It was mealy 
a legitimate and /expected/ "no" answer to the question "is a's type B?"





More information about the Digitalmars-d mailing list