bool (was DConf 2019 AGM Livestream)
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Mon May 13 11:16:04 UTC 2019
On 5/12/19 11:46 PM, H. S. Teoh wrote:
> On Sun, May 12, 2019 at 01:20:16PM +0000, Mike Franklin via Digitalmars-d-announce wrote:
> [...]
>> If anyone's looking for a challenge, I welcome them to propose a new
>> `Bool` type (note the capital B) for inclusion in my new library.
> [...]
>
> As long as && and || continue to evaluate to a 1-bit integer, all
> library efforts to implement Bool will be futile.
When writing std.typecons.Ternary I thought of overloading opBinary for
| and & to take a lazy argument on the right. I forgot why I ended up
not doing it (I think it was because of code generation issues). This is
something that could be made to work.
More information about the Digitalmars-d-announce
mailing list