Confused about const

Paul D. Anderson paul.d.removethis at
Fri Mar 19 18:26:40 PDT 2010

bearophile Wrote:

> Paul D. Anderson:
> >     S x = cast(S) a;
> >     S y = cast(S) b;
> In Java (especially old Java) casts may be common, but in D they are something that has to be used with care, don't cast away things carelessly :-)
> Bye,
> bearophile

I realize that casting is a last resort -- but it seemed to be the only thing that worked. That's what made me think I'm making some sort of fundamental mistake.


More information about the Digitalmars-d-learn mailing list