[bitc-dev] Incompatibility in strings

Jonathan S. Shapiro shap at eros-os.org
Sun Feb 19 14:32:02 EST 2006


Section 2.4.4 of the current specification states that, in general, if

	#\<stuff>

is a valid character literal, then \<stuff> may appear within a string
literal and encodes the same character. This will be changing. In BitC
0.10, this statement will only be true for the character literals that
are encoded with curly braces, as in:

	#\{<stuff>}

To avoid breakage in interim compilers, you should avoid unnecessary
backslashes within strings. For example, if you mean 'n', you should
*not* write '\n' in the string -- this is especially true in this
particular case, because \n is about to get a different meaning.


Beginning in BitC 0.10, the radix form for character literals will be
dropped, and will be replaced with:

	#\{U+hexdigits}

Beginning in BitC 0.10, support for the curly-braced non-printing
character forms like

	#\{tab}

will be transitional only. These should be replaced by

	#\tab

which is consistent with Scheme and LISP usage. Support for the curly
braced forms will be dropped beginning in BitC 0.11.

I have a pending specification update that captures all this. I'll check
it in when I have the corresponding compiler updates done.



More information about the bitc-dev mailing list