Re: j.ul.Objects follow-up: methods for var-argification?

2009-10-13 Thread Joseph D. Darcy
Rémi Forax wrote: Le 12/10/2009 19:25, Joseph D. Darcy a écrit : Joshua Bloch wrote: Joe, I'm not sure I like this idea. My one experience with forcing an array method to do double duty as varargs method was a disaster. The method was Arrays.asList, and the result was Puzzler # 7 from "Th

Re: j.ul.Objects follow-up: methods for var-argification?

2009-10-13 Thread Bob Lee
On Mon, Oct 12, 2009 at 12:52 PM, Rémi Forax wrote: > It's not a good idea to have a hashCode() that allocate objects, > at least until escape analysis is implemented in all VMs. Agree with Joe--these methods don't carry their weight. If the allocation is too much to bear, it's easy enough to w

Re: j.ul.Objects follow-up: methods for var-argification?

2009-10-13 Thread Rémi Forax
Le 12/10/2009 19:25, Joseph D. Darcy a écrit : Joshua Bloch wrote: Joe, I'm not sure I like this idea. My one experience with forcing an array method to do double duty as varargs method was a disaster. The method was Arrays.asList, and the result was Puzzler # 7 from "The Continuing Advent

Re: j.ul.Objects follow-up: methods for var-argification?

2009-10-13 Thread Rémi Forax
Le 12/10/2009 20:41, Joseph D. Darcy a écrit : Rémi Forax wrote: Le 12/10/2009 19:25, Joseph D. Darcy a écrit : Joshua Bloch wrote: Joe, I'm not sure I like this idea. My one experience with forcing an array method to do double duty as varargs method was a disaster. The method was Arrays.

Re: j.ul.Objects follow-up: methods for var-argification?

2009-10-12 Thread Joseph D. Darcy
Joshua Bloch wrote: Joe, I'm not sure I like this idea. My one experience with forcing an array method to do double duty as varargs method was a disaster. The method was Arrays.asList, and the result was Puzzler # 7 from "The Continuing Adventures of Java™Puzzlers: Tiger Traps." Here it is

Re: j.ul.Objects follow-up: methods for var-argification?

2009-10-09 Thread Ulf Zibis
Joe, much thank for your explanation. :-) -Ulf Am 09.10.2009 20:46, Joseph D. Darcy schrieb: Ulf Zibis wrote: Am 08.10.2009 20:34, Joseph D. Darcy schrieb: Hello. In the discussion about java.util.Objects, a few existing JDK methods were mentioned for possible var-argification: java.util

Re: j.ul.Objects follow-up: methods for var-argification?

2009-10-09 Thread Joseph D. Darcy
Ulf Zibis wrote: Am 08.10.2009 20:34, Joseph D. Darcy schrieb: Hello. In the discussion about java.util.Objects, a few existing JDK methods were mentioned for possible var-argification: java.util.Arrays.hashCode(Object[] a) java.util.Arrays.deepHashCode(Object[] a) java.util.Arrays.toString(

Re: j.ul.Objects follow-up: methods for var-argification?

2009-10-09 Thread Joshua Bloch
Joe, I'm not sure I like this idea. My one experience with forcing an array method to do double duty as varargs method was a disaster. The method was Arrays.asList, and the result was Puzzler # 7 from "The Continuing Adventures of Java™Puzzlers: Tiger Traps." Here it is: *7. “Fib O’Nacci”* pu

Re: j.ul.Objects follow-up: methods for var-argification?

2009-10-09 Thread Ulf Zibis
Am 08.10.2009 20:34, Joseph D. Darcy schrieb: Hello. In the discussion about java.util.Objects, a few existing JDK methods were mentioned for possible var-argification: java.util.Arrays.hashCode(Object[] a) java.util.Arrays.deepHashCode(Object[] a) java.util.Arrays.toString(Object[] a) Also

j.ul.Objects follow-up: methods for var-argification?

2009-10-08 Thread Joseph D. Darcy
Hello. In the discussion about java.util.Objects, a few existing JDK methods were mentioned for possible var-argification: java.util.Arrays.hashCode(Object[] a) java.util.Arrays.deepHashCode(Object[] a) java.util.Arrays.toString(Object[] a) Also of possible general interest are some methods o