RFR - Implementation of JEP-430 String Templates (Preview) CSR

2022-10-25 Thread Jim Laskey
Request for a broader review of the String Template APIs for JEP 430. Summary: Enhance the Java programming language with string templates, which are similar to string literals but contain embedded expressions. A string template is interpreted at run time by replacing each expression with the r

Re: [External] : Re: RFR - Implementation of JEP-430 String Templates (Preview) CSR

2022-10-27 Thread Jim Laskey
some more thinking, it may be not that bad and at least the API is very simple to use. Rémi From: "Remi Forax" To: "Jim Laskey" Cc: "core-libs-dev" Sent: Wednesday, October 26, 2022 11:25:58 AM Subject: Re: RFR - Implementation o

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

2022-10-27 Thread Jim Laskey
Enhance the Java programming language with string templates, which are similar to string literals but contain embedded expressions. A string template is interpreted at run time by replacing each expression with the result of evaluating that expression, possibly after further validation and tran

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

2022-10-28 Thread Jim Laskey
r validation and > transformation. This is a [preview language feature and > API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Move StringConcatItem to FormatConcatItem - Chang

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

2022-10-28 Thread Jim Laskey
On Thu, 27 Oct 2022 21:21:52 GMT, ExE Boss wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Move StringConcatItem to FormatConcatItem > > src/java.base/share/classes/java/lang/invoke

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

2022-10-28 Thread Jim Laskey
r validation and > transformation. This is a [preview language feature and > API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Update TemplateRuntime::combine - Chang

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

2022-10-28 Thread Jim Laskey
On Fri, 28 Oct 2022 16:09:51 GMT, j3graham wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Move StringConcatItem to FormatConcatItem > > src/java.base/share/classes/java/lang/template

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

2022-10-28 Thread Jim Laskey
On Fri, 28 Oct 2022 16:33:31 GMT, Maurizio Cimadamore wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java line 4139: >> >>> 4137: List typeArguments = >>> interfaceType.getTypeArguments(); >>> 4138: >>> 4139: if (typeArguments.size() == 2) { >>

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

2022-10-28 Thread Jim Laskey
On Fri, 28 Oct 2022 16:33:11 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Move StringConcatItem to FormatConcatItem > > src/jdk.compiler/share/cl

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

2022-10-28 Thread Jim Laskey
On Fri, 28 Oct 2022 18:45:05 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/java.base/share/classes/java/lang/AbstractString

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

2022-10-28 Thread Jim Laskey
r validation and > transformation. This is a [preview language feature and > API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Remove .orig file - Changes: - all: https://git.op

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

2022-10-28 Thread Jim Laskey
On Fri, 28 Oct 2022 18:52:28 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/java.base/share/classes/java/lang/invoke/StringC

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

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 20:23:26 GMT, Rémi Forax wrote: >> Wrong use case. Think `StringProcessor upper = st -> >> st.interpolate().toUpperCase();` > > Is it that different from`TemplateProcessor upper = st -> > st.interpolate().toUpperCase();` ? > > People are really used to use <> with the funct

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

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 20:07:35 GMT, Rémi Forax wrote: >> The defensive copies are done by the callers. > > In that case, i wonder if not not better to move that record inside another > class, closer to where the callers are Moving to TemplateRuntime - PR: https://git.openjdk.org/jdk

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

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 19:05:10 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/java.base/share/classes/java/lang/template/StringT

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

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 19:06:43 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/java.base/share/classes/java/lang/template/StringTem

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

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 19:08:56 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/java.base/share/classes/java/lang/template/StringTem

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

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 19:12:02 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/java.base/share/classes/java/lang/template/StringTem

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

2022-10-31 Thread Jim Laskey
On Mon, 31 Oct 2022 07:14:45 GMT, Rémi Forax 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` >> or `Supplier`,

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

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 19:57:41 GMT, Rémi Forax wrote: >> `List.of()` can't be used here, since the elements are nullable, according >> to the documentation. But the the returned list can still be modified, by >> changing the given `elements` array. The input array must be explicitly >> copied: >

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

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 19:20:40 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/java.base/share/classes/java/lang/template/Template

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

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 19:26:20 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/java.base/share/classes/java/lang/template/Template

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

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 19:33:38 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/java.base/share/classes/java/lang/template

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

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 19:39:01 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/java.base/share/classes/java/lang/template

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

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 19:36:07 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/java.base/share/classes/java/lang/template

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

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 19:45:55 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/java.base/share/classes/java/util/FormatProc

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

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 23:50:11 GMT, j3graham wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove .orig file > > src/java.base/share/classes/java/util/FormatterBuilder.java line

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

2022-10-31 Thread Jim Laskey
r validation and > transformation. This is a [preview language feature and > API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request incrementally with two additional commits since the last revision: - Requested changes #2 - Requested changes - Chang

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

2022-10-31 Thread Jim Laskey
r validation and > transformation. This is a [preview language feature and > API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Move template bootstrap - Changes: - all: https

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

2022-10-31 Thread Jim Laskey
r validation and > transformation. This is a [preview language feature and > API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Add @SafeVarargs declarations - Chang

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

2022-11-01 Thread Jim Laskey
On Mon, 31 Oct 2022 13:43:24 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/lang/template/TemplateRuntime.java line 45: >> >>> 43: */ >>> 44: @PreviewFeature(feature=PreviewFeature.Feature.STRING_TEMPLATES) >>> 45: public final class Tem

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

2022-11-01 Thread Jim Laskey
On Mon, 31 Oct 2022 15:51:23 GMT, Rémi Forax wrote: >> Actually instance interpolate() is the most important method. Each synthetic >> StringTemplate gets a specialized interpolate providing performance >> equivalent to string concat. And, a good percentage of processors will work >> with the

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

2022-11-01 Thread Jim Laskey
On Mon, 31 Oct 2022 20:50:49 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add @SafeVarargs declarations > > src/java.base/share/classes/java/lang/template/TemplateRu

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

2022-11-01 Thread Jim Laskey
On Mon, 31 Oct 2022 21:23:19 GMT, Stuart Marks wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add @SafeVarargs declarations > > src/java.base/share/classes/java/lang/template/Template

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

2022-11-02 Thread Jim Laskey
r validation and > transformation. This is a [preview language feature and > API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merg

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

2022-11-02 Thread Jim Laskey
r validation and > transformation. This is a [preview language feature and > API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Requested changes #3 - Changes: - all: https://g

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

2022-11-02 Thread Jim Laskey
On Tue, 1 Nov 2022 12:41:19 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add @SafeVarargs declarations > > src/jdk.compiler/share/classes/com/sun/tools

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

2022-11-02 Thread Jim Laskey
On Fri, 28 Oct 2022 18:47:54 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/jdk.compiler/share/classes/com/sun/tools/

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

2022-11-02 Thread Jim Laskey
On Tue, 1 Nov 2022 12:50:52 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add @SafeVarargs declarations > > src/jdk.compiler/share/classes/com/sun/tools

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

2022-11-02 Thread Jim Laskey
On Tue, 1 Nov 2022 12:57:03 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add @SafeVarargs declarations > > src/jdk.compiler/share/classes/com/sun/tools

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

2022-11-02 Thread Jim Laskey
On Tue, 1 Nov 2022 17:33:30 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add @SafeVarargs declarations > > src/java.base/share/classes/java/util/FormatProc

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

2022-11-02 Thread Jim Laskey
r validation and > transformation. This is a [preview language feature and > API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Requested changes #4 - Changes: - all: https://g

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

2022-11-02 Thread Jim Laskey
r validation and > transformation. This is a [preview language feature and > API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Internalize TemplateSupport - Chang

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

2022-11-03 Thread Jim Laskey
On Wed, 2 Nov 2022 17:04:29 GMT, Jorn Vernee wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add @SafeVarargs declarations > > src/java.base/share/classes/java/lang/runtime/Template

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

2022-11-03 Thread Jim Laskey
On Wed, 2 Nov 2022 17:06:50 GMT, Jorn Vernee wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add @SafeVarargs declarations > > src/java.base/share/classes/java/lang/runtime/TemplateSu

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

2022-11-03 Thread Jim Laskey
On Wed, 2 Nov 2022 17:53:03 GMT, Jorn Vernee wrote: >> Jim Laskey has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 22 addi

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

2022-11-03 Thread Jim Laskey
On Wed, 2 Nov 2022 17:23:24 GMT, Jorn Vernee wrote: >> src/java.base/share/classes/java/lang/runtime/TemplateSupport.java line 184: >> >>> 182: MethodHandle mh = >>> MethodHandles.insertArguments(DEFAULT_PROCESS_MH, 0, fragments, processor); >>> 183: mh = mh.withVarargs(true); >

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

2022-11-03 Thread Jim Laskey
On Wed, 2 Nov 2022 17:44:24 GMT, Rémi Forax wrote: >> Will use List.of. I think use case is raw and caching should be left to the >> user. > > i agree I agree. Need a balance of performance and #classes. Just something I'll work on during preview. - PR: https://git.openjdk.org/jd

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

2022-11-03 Thread Jim Laskey
On Wed, 2 Nov 2022 18:01:41 GMT, Jorn Vernee wrote: >> Jim Laskey has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 22 addi

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

2022-11-03 Thread Jim Laskey
On Wed, 2 Nov 2022 20:07:15 GMT, Jorn Vernee wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Internalize TemplateSupport > > src/java.base/share/classes/java/lang/invoke/StringC

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

2022-11-03 Thread Jim Laskey
On Wed, 2 Nov 2022 22:50:29 GMT, Vladimir Ivanov wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Internalize TemplateSupport > > src/java.base/share/classes/java/lang/StringConcatH

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

2022-11-03 Thread Jim Laskey
On Wed, 2 Nov 2022 20:07:50 GMT, Jorn Vernee wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Internalize TemplateSupport > > src/java.base/share/classes/java/lang/invoke/StringC

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

2022-11-03 Thread Jim Laskey
r validation and > transformation. This is a [preview language feature and > API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Requested changes #5 - Changes: - all: https://g

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

2022-11-03 Thread Jim Laskey
r validation and > transformation. This is a [preview language feature and > API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Internalize FormatConcatItem - Chang

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

2022-11-03 Thread Jim Laskey
On Tue, 1 Nov 2022 15:31:20 GMT, Jan Lahoda wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add @SafeVarargs declarations > > src/java.base/share/classes/java/util/FormatConcatItem.jav

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

2022-11-09 Thread Jim Laskey
On Tue, 1 Nov 2022 19:06:57 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/lang/template/TemplateRuntime.java line 99: >> >>> 97: private static List toList(E... elements) { >>> 98: return JUCA.listFromTrustedArrayNullsAllowed(elements); &g

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

2022-11-09 Thread Jim Laskey
On Fri, 28 Oct 2022 19:38:26 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java line >> 36: >> >>> 34: import java.lang.invoke.MethodHandles.Lookup; >>> 35: import java.lang.template.StringTemplate; >>>

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

2022-11-09 Thread Jim Laskey
On Fri, 28 Oct 2022 19:38:28 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 32: >> >>> 30: >>> 31: import java.io.IOException; >>> 32: import java.util.*; >> >> Please do not use import *

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

2022-11-09 Thread Jim Laskey
On Thu, 3 Nov 2022 14:48:25 GMT, Jim Laskey wrote: >> i agree > > I agree. Need a balance of performance and #classes. Just something I'll work > on during preview. Changing - PR: https://git.openjdk.org/jdk/pull/10889

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

2022-11-09 Thread Jim Laskey
On Wed, 2 Nov 2022 17:41:57 GMT, Jorn Vernee wrote: >> It is also a duplicate of a private method in TemplateRuntime > > Yes, this is leaking access. I suppose this is public because it is called > from `javac` generated code. But, from the perspective of the runtime, code > generated by `javac

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

2022-11-09 Thread Jim Laskey
On Wed, 9 Nov 2022 21:55:24 GMT, Rémi Forax wrote: >> src/java.base/share/classes/java/lang/template/StringTemplate.java line 276: >> >>> 274: * @implNote Contents of both lists are copied to construct >>> immutable lists. >>> 275: */ >>> 276: public static StringTemplate of(List

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

2022-11-09 Thread Jim Laskey
On Sun, 6 Nov 2022 13:28:18 GMT, ExE Boss wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Internalize FormatConcatItem > > src/java.base/share/classes/java/util/FormatItem.java line 75:

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

2022-11-09 Thread Jim Laskey
On Sun, 6 Nov 2022 22:15:22 GMT, Joe Darcy wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Internalize FormatConcatItem > > src/java.base/share/classes/java/util/FormatProcessor.java li

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

2022-11-09 Thread Jim Laskey
On Sat, 5 Nov 2022 22:23:56 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Internalize FormatConcatItem > > src/java.base/share/classes/java/lang/template/StringTem

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

2022-11-09 Thread Jim Laskey
On Sun, 6 Nov 2022 22:14:29 GMT, Joe Darcy wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Internalize FormatConcatItem > > src/java.base/share/classes/java/util/FormatProcessor.

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

2022-11-09 Thread Jim Laskey
On Wed, 9 Nov 2022 22:42:29 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/lang/template/StringTemplate.java line 299: >> >>> 297: * @throws NullPointerException fragments or values is null or if >>> any of the fragments is null >>>

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

2022-11-09 Thread Jim Laskey
r validation and > transformation. This is a [preview language feature and > API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merg

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

2022-11-09 Thread Jim Laskey
On Mon, 7 Nov 2022 18:12:39 GMT, Naoto Sato wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Internalize FormatConcatItem > > src/java.base/share/classes/java/util/Forma

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

2022-11-09 Thread Jim Laskey
On Wed, 9 Nov 2022 23:48:57 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with

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

2022-11-09 Thread Jim Laskey
r validation and > transformation. This is a [preview language feature and > API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Switch from anonymous classes to carrier based StringTempl

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

2022-11-10 Thread Jim Laskey
On Wed, 9 Nov 2022 23:24:32 GMT, Jim Laskey wrote: >> Changing > > Have to backtrack short term. This change forces StringTemplate.values() to > return List. Will have to think this through (affects the JLS et al) Worked this through for both StringTemplate.of and StringTempl

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

2022-11-10 Thread Jim Laskey
r validation and > transformation. This is a [preview language feature and > API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Clean up new StringTemplate creation Centralized StringTe

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

2022-11-10 Thread Jim Laskey
On Thu, 10 Nov 2022 16:44:18 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Clean up new StringTemplate creation >> >> Centralized StringTemplate creation

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

2022-11-10 Thread Jim Laskey
r validation and > transformation. This is a [preview language feature and > API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Requested changes #5 - Changes: - all: https://g

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

2022-11-10 Thread Jim Laskey
On Thu, 10 Nov 2022 19:54:30 GMT, Jorn Vernee wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Requested changes #5 > > src/java.base/share/classes/java/lang/template/Car

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

2022-11-10 Thread Jim Laskey
On Fri, 11 Nov 2022 00:55:24 GMT, Jorn Vernee wrote: >> Fair comment. Initially, 99% of template processing will be through `STR``. >> However, that >> will likely change as libraries expand to include template processing. In >> fact, creating >> processors is so trivially easy that users will

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

2022-11-12 Thread Jim Laskey
On Sat, 12 Nov 2022 07:17:30 GMT, danieljarabek wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Requested changes #5 > > src/java.base/share/classes/java/util/FormatterBuilder.jav

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

2022-11-14 Thread Jim Laskey
r validation and > transformation. This is a [preview language feature and > API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Requested changes #7 @Stable removal process decl in Tem

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

2022-11-14 Thread Jim Laskey
r validation and > transformation. This is a [preview language feature and > API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merg

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

2022-11-14 Thread Jim Laskey
r validation and > transformation. This is a [preview language feature and > API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Wrong line separator - Changes: - all: https://g

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

2022-11-14 Thread Jim Laskey
r validation and > transformation. This is a [preview language feature and > API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Wrong line separator - Changes: - all: https://g

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

2022-11-15 Thread Jim Laskey
On Mon, 14 Nov 2022 17:51:24 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with

RFR of JDK-8285932 Implementation of JEP-430 String Templates (Preview)

2022-11-16 Thread Jim Laskey
May I get a final (PR) review of JDK-8285932 Implementation of JEP-430 String Templates (Preview) from core-libs and compiler. PR: https://github.com/openjdk/jdk/pull/10889 JBS: https://bugs.openjdk.org/browse/JDK-8285932 CSR: https://bugs.openjdk.org/browse/JDK-8286021 JEP: https://openjdk.or

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

2022-11-16 Thread Jim Laskey
On Wed, 16 Nov 2022 13:12:49 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Wrong line separator > > src/java.base/share/classes/java/lang/runtime/TemplateRu

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

2022-11-16 Thread Jim Laskey
On Wed, 16 Nov 2022 15:22:43 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Wrong line separator > > src/jdk.compiler/share/classes/com/sun/tools/javac/comp/

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

2022-11-16 Thread Jim Laskey
On Wed, 16 Nov 2022 15:26:05 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Wrong line separator > > src/jdk.compiler/share/classes/com/sun/tools/javac

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

2022-11-16 Thread Jim Laskey
On Wed, 16 Nov 2022 15:26:55 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Wrong line separator > > src/java.base/share/classes/java/lang/template/StringT

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

2022-11-16 Thread Jim Laskey
On Wed, 16 Nov 2022 15:27:47 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Wrong line separator > > src/java.base/share/classes/java/lang/template/StringT

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

2022-11-16 Thread Jim Laskey
On Wed, 16 Nov 2022 15:32:40 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Wrong line separator > > src/java.base/share/classes/java/lang/template/StringTem

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

2022-11-16 Thread Jim Laskey
On Wed, 16 Nov 2022 15:36:30 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Wrong line separator > > src/java.base/share/classes/java/lang/template/StringTem

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

2022-11-16 Thread Jim Laskey
On Wed, 16 Nov 2022 15:37:10 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Wrong line separator > > src/java.base/share/classes/java/lang/template/StringTem

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

2022-11-16 Thread Jim Laskey
On Wed, 16 Nov 2022 15:41:49 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/template/StringTemplate.java line 273: >> >>> 271: >>> 272: /** >>> 273: * Combine one or more {@link StringTemplate StringTemplates} to >>> produce a combined {@link StringTemplate

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

2022-11-16 Thread Jim Laskey
On Wed, 16 Nov 2022 15:43:42 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Wrong line separator > > src/java.base/share/classes/java/lang/template/StringTem

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

2022-11-16 Thread Jim Laskey
On Wed, 16 Nov 2022 15:44:55 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Wrong line separator > > src/java.base/share/classes/java/lang/template/TemplatePr

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

2022-11-16 Thread Jim Laskey
On Wed, 16 Nov 2022 15:54:49 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Wrong line separator > > src/java.base/share/classes/java/lang/template/Processor

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

2022-11-16 Thread Jim Laskey
On Wed, 16 Nov 2022 15:55:27 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Wrong line separator > > src/java.base/share/classes/java/util/FormatProcessor.

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

2022-11-16 Thread Jim Laskey
On Wed, 16 Nov 2022 15:56:25 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/util/FormatProcessor.java line 42: >> >>> 40: * the embedded expression that follows immediately after the >>> 41: * format specifier. >>> 42: * StringTemplate expressions without a preceeding sp

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

2022-11-16 Thread Jim Laskey
r validation and > transformation. This is a [preview language feature and > API](http://openjdk.java.net/jeps/12). Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Requested changes #8 - Changes: - all: https://g

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

2022-11-16 Thread Jim Laskey
On Wed, 16 Nov 2022 16:01:20 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Wrong line separator > > Compiler changes look good to me. I've left some com

Re: RFR of JDK-8285932 Implementation of JEP-430 String Templates (Preview)

2022-11-16 Thread Jim Laskey
preserve the semantics of string templates and text block templates, the list returned by `fragments()` must be one element larger than the list returned by `values()`. @jls 15.8.6 Alex On 11/16/2022 4:49 AM, Jim Laskey wrote: May I get a final (PR) review of JDK-8285932 Implementation of JEP-

  1   2   3   4   5   6   >