RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

Jim Laskey jlaskey at openjdk.org
Mon Oct 31 13:40:38 UTC 2022


On Mon, 31 Oct 2022 07:14:45 GMT, Rémi Forax <forax at openjdk.org> wrote:

>> Actually, `StringTemplate::interpolate` is fine, as this method takes two parameters, whereas the instance method only takes an implicit `this` parameter.
>> 
>> The instance method is only assignable to `Function<StringTemplate, String>` or `Supplier<String>`, and the static method is only assignable to `BiFunction<List<String>, List<Object>, String>`.
>
> Ok, get it.
> I still see not reason to have this method being public given that this is equivalent to `Template.of(fragments, values).interpolate()`.
> 
> The less methods in the API, the better.

Noted

-------------

PR: https://git.openjdk.org/jdk/pull/10889


More information about the compiler-dev mailing list