Re: [COLLECTIONS] CartesianProductIterator

2024-06-26 Thread Peter Burka
I don't know if it's been proposed before, but I think any implementation would necessarily be inefficient. I imagine such an iterator would need to produce objects of type Pair. This would lead to a lot of allocation and could create garbage collection pressure. The same functionality can be achie

Re: [LANG] LANG-1747: Measure the execution time of functional interfaces #1254

2024-08-17 Thread Peter Burka
I think this is a useful addition, but I wonder if these new APIs are misnamed: StopWatch::test doesn't actually test, nor does StopWatch::accept consume. Instead, these all wrap lambdas in a timed version of the same type. (There's probably some lambda calculus terminology for this.) I'd propose

Re: [beanutils] Thoughts on PR https://github.com/apache/commons-beanutils/pull/276

2024-09-04 Thread Peter Burka
I agree with Gary. If an object is exposing sensitive data in its toString() then the problem should be fixed at the source. Peter On Tue, Sep 3, 2024, 11:04 AM Gary D. Gregory wrote: > I appreciate the intent but this feels like bad solution. If a toString() > method return a password, then t

Re: [text] Upper/Lower case enum

2018-02-22 Thread Peter Burka
This feels like it might have been more useful pre-Java 8. Why not use a lamda function, which would permit arbitrary string transformations? /peter On Thu, Feb 22, 2018, 7:42 PM Gary Gregory wrote: > On Thu, Feb 22, 2018 at 4:27 PM, sebb wrote: > > > On 22 February 2018 at 23:15, Gary Gregory

Re: [collections] breaking changes

2018-03-29 Thread Peter Burka
This could be solved if it were possible to force javac to generate bridge methods. There's an extension which would allow that here: https://github.com/infradna/bridge-method-injector, but I suspect it would complicate the build process quite a bit. On Thu, Mar 29, 2018 at 4:48 PM sebb wrote: >

Re: [CLI] [DISCUSS] Help formatter extension proposal

2024-09-25 Thread Peter Burka
That sounds similar to java.io.Writer. Maybe this should be a HelpWriter? On Wed, Sep 25, 2024, 7:11 PM Claude Warren wrote: > Actually the Producer constructor takes an "Appendable" as an argument and > then provides methods like > > printPara("Some text here") > > Which would output a paragrap

Re: [CLI] [DISCUSS] Help formatter extension proposal

2024-09-30 Thread Peter Burka
My vote (which everyone is free to ignore) is still for HelpWriter. It's simple and intuitive, and it's consistent with the names of the methods the interface declares (e.g. writePara, writeTable). I find SemanticAppendableDecorator too verbose and I have no intuition for what it means. Peter On

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

2024-12-15 Thread Peter Burka
:13 AM Elliotte Rusty Harold wrote: > Thanks. In that case I'm -1 on this since it is not available in Java > 8, and even in Java 9 is only possible, not necessarily implemented. > > We can revisit in a few years if the JDK has moved on by then. > > On Sun, Dec 15, 2024 at 1:0

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

2024-12-15 Thread Peter Burka
y Harold wrote: > On Sun, Dec 15, 2024 at 2:00 PM Peter Burka wrote: > > > > Before Java 9, javac always generated StringBuilder calls for string > > concatenation (or StringBuffer prior to Java 2). Using + is less verbose, > > generates the same code, is more re

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