bool (was DConf 2019 AGM Livestream)
slavo5150 at yahoo.com
Sun May 12 13:20:16 UTC 2019
On Saturday, 11 May 2019 at 20:35:40 UTC, Exil wrote:
> Sure it is convenient to have some properties of bool also be
> similar to an integer, but it can definitely not be swapped in
> to be used like a 1-bit integer and there are already plenty of
> special rules for it.
Thanks for that analysis. So we have a bool that is neither a
boolean nor a bit. That stinks.
Walter and Andrei have made their decision, so it doesn't look
like we'll be able to do anything about it unless maybe Atila
feels that it's something that needs to be addressed.
Anyway, I'm of the mind that the language should just provide a
set of powerful, composable primitives and delegate
course-grained features and specializations to the library. I've
been re-imagining druntime and phobos at lot lately and I'm more
confident that we can define a wrapper around `bool` to give it
proper boolean semantics. Maybe, if Walter would support it, we
could then fix bool to make it a proper `bit`. Then in the
library `alias bit = bool;` and live happily ever after.
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
More information about the Digitalmars-d-announce