Jonathan S. Shapiro wrote: > On Wed, Mar 10, 2010 at 1:28 PM, Sandro Magi <[email protected]> wrote: > >> Just use a full word, and the string representation can use a more >> packed form to avoid waste. >> > > This is the position that I think sounds right, but I'm not a Unicode > expert. Let's play with it for a moment. > > So you are saying that BitC "char" is 32-bit. That is: a CodePoint. > Assuming this, when we bring in a data structure from C# having a > field of type char, how does that type appear in BitC? As a working > name, let me call it "CodeUnit". Now what relationship, if any, exists > between CodeUnit and BitC char? > I now think I also agree about the "full word" (as long as we agree that it means an unsigned 32 bit integer), but I'd suggest a different stance on "char".
Given that the notion of "char" turns out to be a bit confused, why not skip it in BitC? That is: don't have a "char" type at all. CodePoint is a good type name for the full-word thing, and CodeUnit seems as good a name as any for what CLI calls [MSCorlib]System.Char... or perhaps UTF16Unit? _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
