Rationale for not allowing overload of && and ||?
BCS
ao at pathlink.com
Wed Jun 18 14:02:12 PDT 2008
Reply to bearophile,
> Joe Gauterin Wrote:
>
>> What is the rationale for not allowing overloading of && and ||? It
>> seems to me that, with the 'lazy' keyword, D is one of the few
>> languages where overloaded && and || can correctly implement short
>> circuited evaluation.
>>
> I have created lazyAnd(), lazyOr() in my libs, and I think I like them
> more explicitly named, to avoid confusion. They are shaped like:
>
|| and && are lazy in D
What does your provide that the native one don't?
More information about the Digitalmars-d
mailing list