Proposal: Embedded Expressions for String Statements

Howard Lovatt howard.lovatt at iee.org
Wed Mar 18 15:05:43 PDT 2009


I like Stefan's proposed syntax and as a way of a motivating example
consider writing a toString method that gives the field values within
square brackets, now you would write:

    "[" + field1 + ", " + field2 + ", " + field3 + "]"

With the proposal you would say:

    "[\{field1}, \{field2}, \{field3}]"

Which I find clearer.

Many thanks to Stefan for writing this up formally.



More information about the coin-dev mailing list