This will solve a whole bunch of problems.
UInt1 is a lot more intuitive than Bool as a identity element for promote_type.
true + true === 2 won't be inconsistent with every other unsigned type; we can have UInt1(1) + UInt1(1) === UInt1(0) as expected.
Bool can be made non-numeric. (cc @StefanKarpinski)
I think the current system is really not ideal; it's worse than a method pun: it's punning a type for two very different things.
This will solve a whole bunch of problems.
UInt1is a lot more intuitive thanBoolas a identity element forpromote_type.true + true === 2won't be inconsistent with every other unsigned type; we can haveUInt1(1) + UInt1(1) === UInt1(0)as expected.Boolcan be made non-numeric. (cc @StefanKarpinski)I think the current system is really not ideal; it's worse than a method pun: it's punning a type for two very different things.