PROPOSAL: String literals: version 1.1
rssh at gradsoft.com.ua
rssh at gradsoft.com.ua
Tue Mar 3 07:23:56 PST 2009
>> String foo= """\""" """ is """
>
> Is there really a need for escaping? If users want to escape, they can
> still use the regular "" string literals. I'd rather have no escaping at
> all. Otherwise, you probably also need to escape the \ if you want the
We have row unescaped strings with '' brackets already in this proposal.
> string to contain \" at the end. """An example:\\"""". The rule 'The new
> string literals don't support any escape sequences' if much better than
> 'The new string literals only support the escape sequences \""", which
> means """ and \\, which means \\'.
>
Rule can be formed as: we have two new types of literals:
with or without escape sequences. First supports all traditional escape
sequences, second have no escape sequences at all.
> What about supporting " or "" at the beginning or end of the new string
> literals? That would result in """" or """"". Or even """""""" if you push
> it to the limits. Wouldn't that be hard on the compiler?
>
Will try ;)
More information about the coin-dev
mailing list