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

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 fo...@univ-mlv.fr 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

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

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
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

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)

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