digitalmars.D - Re: rtti cast
- terranium <spam here.lot> May 08 2008
- BCS <ao pathlink.com> May 08 2008
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.
a little sugar for the other way might be even handier
May 08 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.
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?"
May 08 2008