Extending basic types - bool
Johan Granberg
lijat.meREM at OVE.gmail.com
Fri Jan 19 07:39:33 PST 2007
inteja wrote:
> %u Wrote:
>
>> Frits van Bommel Wrote:
>> > The operators !, ., &&, ||, ?:, and a few others will likely never be
>> > overloadable.
>> This was set up long before Walter implemented lazy evaluation. Now that
>> D has lazy evaluation it should be easy to make at least &&, || and ?:
>> overloadable.
>
> But even if possible, wouldn;t this conflict with what Frits also said
> i.e. "The reason is likely that those operators already have a definition
> when used with a class instance."?
>
> If it is technically feasible, I guess we need to wait for clarification
> from Walter?
>
>
> inteja.
Instead of overloading logical operator which can be confusing, couldn't
there be an opTrue operator or somthing similar merging several operators
into one in the same way as opCompare.
More information about the Digitalmars-d-learn
mailing list