Proposal: Embedded Expressions for String Statements (original) (raw)

Stefan Schulz schulz at e-spirit.de
Sun Mar 15 15:05:53 PDT 2009


I'm sorry the examples were a bit uninspired, it was a first cast to get it discussed. Maybe, the example given by Neal fits much better to make the (admittedly) small benefits of the change a bit more clear. Moreover, I think, especially multi-line Strings would benefit from embedding expressions (but of course, neither depends on the other).

Jeremy Manson schrieb:

On the flip side, I'm not a big fan of { as a delimiter. It seems to me that there should be a way to unify the general desire for better String handling (escaped Strings, multi-line Strings, embedded expressions). Can we colonize the ` (back-tick) character and start Strings over again from scratch?

I was just about to propose using the backtick for escape-free Strings, but then again, it might be possible to use the same (or a similar) notation for expressions as for escape sequences. In other languages, I could find no unifying solution but seperate ones for the String features, like choosable quoting characters (leading by %, e.g. %/some string/) and multi-line definition (introduced by "\ followed by a new-line).

The question is, if a unifying proposal will be possible that still fits as a small change into Coin. So I'd rather first like to see all the proposals or features in a small specification and then maybe join them into one bigger proposal.

Stefan



More information about the coin-dev mailing list