String Interpolation
Kamil Ševeček
kamil at sevecek.net
Tue Nov 24 10:05:58 UTC 2020
Hello
I actually think that it is a great idea. My suggestion is to get
inspiration from Kotlin:
String message = "Hello ${expression.property}";
and possibly short-hand for a single variable:
String message = "Hello $variable";
Of course, I understand it is not possible to use just single " to
distinguish between normal Strings and interpolated Strings. I'll leave
that to others to suggest their ideas.
Kamil Sevecek
On Mon, 23 Nov 2020 at 17:24, Thiago Henrique Hupner <thihup at gmail.com>
wrote:
> Hi!
>
> Now that Text Blocks has been integrated, should be the time to start
> thinking about the String interpolation?
>
> One idea would be using the following syntax: String x = "Text
> \(expression)";
>
>
> Thiago
>
More information about the amber-dev
mailing list