2010/3/10 Eric Northup <[email protected]>:
> It seems to me like interoperability is a compelling reason to use the
> runtime-provided strings, appropriately wrapped and tamed.  Otherwise
> you'll end up allocating and copying strings all over the place at the
> BitC <--> {CLI, JVM} interface.

Yes, it would make sense to implement BitC's string type in UTF-16,
implemented by the string type of the runtime. UTF-16 strings are also
more compact, but lose the constant time random access to code points.

Using an UTF-16 string type doesn't mean that the char type should be
a 16-bit code unit. For reasons already stated, a string type that
always contains valid unicode doesn't really require access to the
underlying code units.

I suppose that since representation matters, the representation of the
string type cannot be implementation-dependent even if the string type
doesn't provide direct access to its representation.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to