Re: RFR: 8041488: Locale-Dependent List Patterns [v12]

2023-09-05 Thread Naoto Sato
On Tue, 5 Sep 2023 21:14:00 GMT, Roger Riggs wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Removing unnecessary commas > > src/java.base/share/classes/java/text/ListFormat.java line 90: > >> 88: * method specifie

Re: RFR: 8041488: Locale-Dependent List Patterns [v12]

2023-09-05 Thread Roger Riggs
On Tue, 29 Aug 2023 16:51:49 GMT, Naoto Sato wrote: >> Introducing a new formatting class for locale-dependent list patterns. The >> class is to provide the functionality from the Unicode Consortium's LDML >> specification for [list >> patterns](https://www.unicode.org/reports/tr35/tr35-genera

Re: RFR: 8041488: Locale-Dependent List Patterns [v12]

2023-09-05 Thread Joe Wang
On Tue, 5 Sep 2023 19:50:26 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/text/ListFormat.java line 560: >> >>> 558: * The {@code UNIT} ListFormat style. This style concatenates >>> 559: * elements, useful for enumerating units. >>> 560: */ >> >> The word

Re: RFR: 8041488: Locale-Dependent List Patterns [v12]

2023-09-05 Thread Naoto Sato
On Tue, 5 Sep 2023 20:25:52 GMT, Roger Riggs wrote: >> Good point. Will add some kind of limitation. > > I can't see what arbitrary limit would make sense. > But perhaps an APINote that formatting the string from an excessively long > list may exceed memory or string sizes. (Without being speci

Re: RFR: 8041488: Locale-Dependent List Patterns [v12]

2023-09-05 Thread Naoto Sato
On Tue, 5 Sep 2023 20:29:53 GMT, Joe Wang wrote: >> Type and Style select a pattern defined for the locale. (for the zero arg >> and three arg getInstance methods). >> I think I would avoid the term "concatenation", the type defines a pattern >> that contains punctuation and connecting words. T

Re: RFR: 8041488: Locale-Dependent List Patterns [v12]

2023-09-05 Thread Joe Wang
On Tue, 5 Sep 2023 20:15:26 GMT, Roger Riggs wrote: >> I think that Type/Style/Locale forming a specific pattern is an >> implementation detail, so I would not describe it in the spec (although as >> you say they form a specific pattern in the impl). It could be that an impl >> of 3-arg getIns

Re: RFR: 8041488: Locale-Dependent List Patterns [v12]

2023-09-05 Thread Roger Riggs
On Tue, 5 Sep 2023 19:50:29 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/text/ListFormat.java line 521: >> >>> 519: var sb = new StringBuilder(256).append(patterns[START]); >>> 520: IntStream.range(2, count - 1).forEach(i -> >>> sb.append(middleBetween).append("{")

Re: RFR: 8041488: Locale-Dependent List Patterns [v12]

2023-09-05 Thread Joe Wang
On Tue, 5 Sep 2023 20:17:14 GMT, Naoto Sato wrote: >> I'd stick to the general first sentence structure used by DateFormat, >> Format, and MessageFormat. >> ("tools" in OpenJDK are standalone programs.) >> >> For example, >> "ListFormat formats and parses lists of strings." > > I agree, Roger.

Re: RFR: 8041488: Locale-Dependent List Patterns [v12]

2023-09-05 Thread Roger Riggs
On Tue, 5 Sep 2023 19:50:23 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/text/ListFormat.java line 48: >> >>> 46: * List Patterns. >>> 47: * >>> 48: * Three types of concatenation are provided: {@link Type#STANDARD >>> STANDARD}, >> >> A "Type" and "Style" together make up a

Re: RFR: 8041488: Locale-Dependent List Patterns [v12]

2023-09-05 Thread Naoto Sato
On Tue, 5 Sep 2023 20:04:57 GMT, Roger Riggs wrote: >> Thanks. Will modify the wording in the next revision. I think we should >> stick to the wording `format`/`parse` here. > > I'd stick to the general first sentence structure used by DateFormat, Format, > and MessageFormat. > ("tools" in Open

Re: RFR: 8041488: Locale-Dependent List Patterns [v12]

2023-09-05 Thread Roger Riggs
On Tue, 5 Sep 2023 19:50:20 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/text/ListFormat.java line 46: >> >>> 44: * defined in Unicode Consortium's LDML specification for >>> 45: * >> href="https://www.unicode.org/reports/tr35/tr35-general.html#ListPatterns";> >>> 46: * List Pat

Re: RFR: 8041488: Locale-Dependent List Patterns [v12]

2023-09-05 Thread Naoto Sato
On Sun, 3 Sep 2023 05:05:49 GMT, Joe Wang wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Removing unnecessary commas > > src/java.base/share/classes/java/text/ListFormat.java line 46: > >> 44: * defined in Unicode

Re: RFR: 8041488: Locale-Dependent List Patterns [v12]

2023-09-02 Thread Joe Wang
On Tue, 29 Aug 2023 16:51:49 GMT, Naoto Sato wrote: >> Introducing a new formatting class for locale-dependent list patterns. The >> class is to provide the functionality from the Unicode Consortium's LDML >> specification for [list >> patterns](https://www.unicode.org/reports/tr35/tr35-genera

Re: RFR: 8041488: Locale-Dependent List Patterns [v12]

2023-08-29 Thread Naoto Sato
> Introducing a new formatting class for locale-dependent list patterns. The > class is to provide the functionality from the Unicode Consortium's LDML > specification for [list > patterns](https://www.unicode.org/reports/tr35/tr35-general.html#ListPatterns). > For example, given a list of Stri