Pure dynamic casts?

Jeremie Pelletier jeremiep at gmail.com
Tue Sep 22 13:00:03 PDT 2009


bearophile wrote:
> Jarrett Billingsley:
> 
>> Or you could - I dunno - cache the result of the dynamic cast in a
>> local, since doing multiple dynamic casts is terrible style anyway.
>> Just saying. ;)
> 
> Yes, most of the optimizations done by the compiler can instead be done by the programmer (but some stupid code can be generated by macros, mixins, etc).
> 
> Bye,
> bearophile

But the compiler has no means to determine that the two calls to 
_d_dynamic_cast will return the same pointer.



More information about the Digitalmars-d mailing list