safer casts - take II

BCS ao at pathlink.com
Tue May 13 13:03:49 PDT 2008


Reply to terranium,

> There is only minor need for this silent cast, I believe, so 1) since
> this is rarely needed, performance penalty is acceptable,

by that augment, "there is only minor need for /down/ casts, I believe, since" 
the throwing kind is even rarer than the non throwing kind. In my experience 
that is the case.

(note: paraphrased to draw attention to the parallel nature of the counter 
argument)

> The type switch from your example can be implemented
> in a more efficient way with a type hashtable.
>

I'm not seeing it, example please?





More information about the Digitalmars-d mailing list