playground::BitMath obsolete Bxxx vs 0bxxx consts

Playground/Code/BitMath states that the Arduino compiler does not support binary constants specified with the 0b prefix, and introduces the "B"-prefix binary constants.

I don't know how far one has to go back for 0b-formatted to not be supported, but it is supported in the more recent versions of Arduino.

Given that the "B"-constants are kind of a kludge, I'm wondering if it wouldn't be best to get rid of the references to the "B"-style constants and go to "0b" instead. Clearly it's counter-productive to actually remove the existing "B" constants, so I'm not suggesting that. However I do think that there's value in not perpetuating them any longer.

I say that "B"-style is a kludge because they're limited in a number of ways, namely that they don't work for constant values greater than 0xFF, and they don't scale beyond 8-bit values well either.

Given that neither "B" or "0b" is "standard", they both present portability problems, so one style can't necessarily be preferred over the other on those grounds. I might even go so far as to say that it might have been better to have initially specified "0b" and the best formatting choice, as they "feel more like" "0x"-style constants, and can be #defined away just as easily as the "B"-style prefixes are, but that point is arguable.

I really like the way that BitMath is written and I'd like to refer to it in lesson plans, but I'm not liking it for its use of "B"-style constants for the reasons mentioned above.

Is there any support for transitioning away from "B"? I'll volunteer to hack the existing documentation if either the team or the original author doesn't have the bandwidth. For historical completeness, a mention of the "B"-style constants should almost certainly be included in the revised version.

I agree.

I only use the compiler supported 'bitstring' notation.