Proposal: Embedded Expressions for String Statements

rssh at gradsoft.com.ua rssh at gradsoft.com.ua
Wed Mar 18 12:57:53 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.
>

Just note: now we can use much cleaner
 concat( field1, ',' , field2, ',' field3 )



> Many thanks to Stefan for writing this up formally.
>
>





More information about the coin-dev mailing list