[Swift-devel] Swift input data: @java and string interpolation bug

Mihael Hategan hategan at mcs.anl.gov
Mon Sep 26 17:22:54 CDT 2011


On Mon, 2011-09-26 at 14:13 -0500, Justin M Wozniak wrote:
> >
> >> string v = "hi";
> >> string u = "{v}";
> >>
> >> results in:
> >>
> >> Execution failed:
> >>          Variable not found: v
> >
> > The compiler should escape "{" I think.
> 
> So should we try to repair this or use a different approach? (I imagine 
> users have seen this.)
> 

I think that if we are to properly do this, then the intermediate XML
should reflect this rather than silently relying on the underlying
implementation.

Whether we're going to use the same syntax is a different story. But I
believe that before we do this, we should discuss the following:
- how are various data types going to be converted to string
- the exact syntax that we want
- whether we're going to support format specifiers (for ints and floats)

Mihael




More information about the Swift-devel mailing list