TSa wrote:
Here we could get away with defining two new enums, e.g. Bit::High and Bit::Low.
I like that approach. Go the same way as Bool and Order value literals. Don't know why I didn't think of it before.
And I want to pose the question if
we really need two types Bool and Bit.
I was also pondering something similar. I question the usefulness of Bit as a base type when we have Bool, Int, and Blob. Perhaps Bit is a similar dust bunny, part of the original type list and then forgotten?
Seen in the context of Blob, the Bit type seems about as appropriate as having a Char type seen in the context of Str. Char was once mentioned in the synopsis but was then dropped.
Now I could see usefulness in a Bit type that was simply defined as a subtype, for example of Int such as UInt is ... making Bit then also a subtype of UInt. Or of Blob where .bits == 1 (.bits is styled like .codes|.graphs etc of Str).
Bit is certainly not a replacement for Bool. If only one stays then Bool needs to stay.
-- Darren Duncan