Re: [LANG] [DISCUSS] Java Modularity support in commons-lang3

2024-12-14 Thread Piotr P. Karwasz
Hi Mark, On 9.12.2024 17:37, Mark Struberg wrote: c) try using this on a class which contains e.g. an ArrayList, a Set or a Map. It will e.g. use List#equals() which also does equals() on it's items (btw, I explained this to you already...). Which is NOT what users expect. Instead it should i

Subject: Proposal: Standardizing String Concatenation in Apache Commons

2024-12-14 Thread Serw
Dear Apache Commons Community, In my recent PR #1332, I replaced a StringBuilder usage with string concatenation in a toString method for improved readability. During the review, it was suggested this change should align with a broader project standard. Would the community support using string co

Re: Subject: Proposal: Standardizing String Concatenation in Apache Commons

2024-12-14 Thread Gary Gregory
Hello serwserw...@gmail.com, Thank you for your email. Here are a few questions: What passes the criteria of "simple cases"? Should this be enforced or can it be enforced? With Checkstyle? Somethings else? Considering: - that we support Java 8 and up to the current version. - that we don't say

Re: Subject: Proposal: Standardizing String Concatenation in Apache Commons

2024-12-14 Thread Piotr P. Karwasz
Hi Serw, On 13.12.2024 22:08, Serw wrote: Would the community support using string concatenation over StringBuilder for simple cases? Modern JDKs (8+) optimize string concatenation efficiently, making it both concise and performant. Since the Javac compiler replaces string concatenation with

Re: Subject: Proposal: Standardizing String Concatenation in Apache Commons

2024-12-14 Thread Piotr P. Karwasz
Hi Gary, On 14.12.2024 17:45, Gary Gregory wrote: What passes the criteria of "simple cases"? I would classify all sequences of `new StringBuilder()`, `append` and `toString` without any branching or loops as simple cases. Should this be enforced or can it be enforced? With Checkstyle? Som

Re: Subject: Proposal: Standardizing String Concatenation in Apache Commons

2024-12-14 Thread Gary Gregory
On Sat, Dec 14, 2024 at 1:56 PM Piotr P. Karwasz wrote: > > Hi Gary, > > On 14.12.2024 17:45, Gary Gregory wrote: > > What passes the criteria of "simple cases"? > > I would classify all sequences of `new StringBuilder()`, `append` and > `toString` without any branching or loops as simple cases.

Re: Subject: Proposal: Standardizing String Concatenation in Apache Commons

2024-12-14 Thread Elliotte Rusty Harold
On Sat, Dec 14, 2024 at 3:08 PM Serw wrote: > Would the community support using string concatenation over StringBuilder > for simple cases? Modern JDKs (8+) optimize string concatenation > efficiently, making it both concise and performant. Interesting. Do you have a reference for that? -- Ell

Re: Subject: Proposal: Standardizing String Concatenation in Apache Commons

2024-12-14 Thread Peter Burka
I presume this is referring to https://openjdk.org/jeps/280 (JEP 280: Indify String Concatenation) which was implemented in Java 9. On Sat, Dec 14, 2024, 6:26 PM Elliotte Rusty Harold wrote: > On Sat, Dec 14, 2024 at 3:08 PM Serw wrote: > > > Would the community support using string concatenat