"is" operator for structures?

Gor Gyolchanyan gor.f.gyolchanyan at gmail.com
Wed May 9 06:51:07 PDT 2012


Because the opBinary is a perfectly valid method. The inability to
overload "is" only affects the rewrite of "A is B" to
"A.opBinart!`is`(B)".

On Wed, May 9, 2012 at 5:46 PM, bearophile <bearophileHUGS at lycos.com> wrote:
> Gor Gyolchanyan:
>
>
>> My question is, why not allow is operator to be overloadable for
>> structures?
>
>
> Or why the bad D compiler doesn't statically refuse the code like:
>
>
>>    bool opBinary(string op : "is")(typeof(null))
>
>
> Bye,
> bearophile
>



-- 
Bye,
Gor Gyolchanyan.


More information about the Digitalmars-d mailing list