proposal: a new string litteral to embed variables in a string

Jacob Carlborg doob at me.com
Thu Oct 31 14:37:23 PDT 2013


On 2013-10-31 22:24, Timothee Cour wrote:
> the proposed new syntax
> r{var1=@a; and var2=@foo}
>
> is replaced by a tuple:
> ("var1=", a, "; and var2=", foo)
> where @ denotes escaping symbols.
>
> @ itself be escaped with \@.
>
> optionally, expressions can be incorporated:
> r{a2=@(a*2); and fooU=@(foo.toUpper)}

Would @ be the best symbol for this. It might get confusing with UDA's.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list