[External] : Re: Are templated string embedded expressions "method parameters" or "lambdas"?

Brian Goetz brian.goetz at oracle.com
Fri Oct 29 18:26:28 UTC 2021


> Do we really need to support the second case at all ?

Yes :)

> Instead of
>    "Hello \{name()}"
>
> it can be written to something like
>    () -> F."Hello \{name()}"

That deprives your callee of the opportunity to choose the formatter for 
you.  Whoops, now the feature is way less expressive.  One of the goals 
here is to enable APIs to accept TSs as parameters, and be in control of 
the when and how of formatting.

>
> I think the choice between eager and lazy should be reflected in the syntax,

Oh great, two subtly different sets of semantics.  Way to overspend the 
complexity budget.




More information about the amber-spec-experts mailing list