Can someone explain why opCast is so limited?
Robert Fraser
fraserofthenight at gmail.com
Thu Sep 6 13:02:09 PDT 2007
Steven Schveighoffer Wrote:
> Excellent! I'm assuming since there is an argument, overloading is
> possible? Also, the 'implicit' suggests that you can do something like:
>
> long l;
> myType x = l;
>
> ???
>
> -Steve
Yes, that will be possible. alter's presentation suggested there would be:
opImplicitCastTo
opImplicitCastFrom
opExplicitCastTo (what "opCast" does right now)
opExplicitCastFrom
All of which will be overloadable on different types (the slides had them overloadable on return type, but Walter mentioned that he might use out params instead). The opExplicitCasts were not mentioned in his slides, but he did say something that suggested they would be there.
More information about the Digitalmars-d-learn
mailing list