Closed
Description
Discussing the validity invariant of the char
type.
The "obvious" choice is that it must be a valid unicode codepoint, and must not contain any uninitialized bits.
However, a possible issue with this choice is that this means we will have to extend the set of valid bit patterns whenever new codepoints get added to unicode. Is that a problem, e.g. when old and new code interact? On first glance it seems like this will only make fewer programs have UB. (@nikomatsakis I think this is related to your "future proofing" concern that you raised elsewhere. Here might be a good place to discuss it with a concrete example.)