String Tapas Redux: Beyond mere string interpolation
Tagir Valeev
amaembo at gmail.com
Fri Sep 17 07:15:05 UTC 2021
Btw people say that Scala provides a similar mechanism using
StringContext class:
https://www.scala-lang.org/api/2.12.2/scala/StringContext.html
In fact, Scala's `s` prefix before interpolated literal is a recipe
for interpolation provided by a standard library, not by language. And
it's possible to declare your own recipes. Quite similar to our
proposal.
Also, there's some frustration in Twitter comments regarding the
article narrative like "We will do it better than existing languages"
(especially because Scala was chosen as an example). Probably, the
wording could be better, with more respect to other languages. Of
course, this doesn't undermine the suggested feature itself, the
feature is great.
With best regards,
Tagir Valeev.
On Fri, Sep 17, 2021 at 9:35 AM Tagir Valeev <amaembo at gmail.com> wrote:
>
> Hello!
>
> Just read the proposal. I don't have any useful comments for now. For
> me, the proposal looks great as is. Go ahead and implement it :D
>
> With best regards,
> Tagir Valeev.
>
> On Thu, Sep 16, 2021 at 8:28 PM Jim Laskey <james.laskey at oracle.com> wrote:
> >
> > Amber experts,
> >
> > Now that JDK 17 has been plated and left the kitchen, we should have a look-see at one of the new menu items Brian and I have had on a slow boil for these last few months; Templated Strings.
> >
> > Before you start shouting out, "Templated Strings? This isn't what I ordered! The subject said string interpolation!!!", take the time to follow this link https://github.com/openjdk/amber-docs/tree/master/site/design-notes/templated-strings.md. After reading, we hope you'll see that the offering is much better than interpolation meat and potatoes.
> >
> > Cheers,
> >
> > -- Jim
More information about the amber-spec-experts
mailing list