On 02/16/2011 08:06 AM, Miroslav Pokorny wrote:
Why would anyone want Person to be a Pair<F,Pair<B,Z>> ?

I have got some questions and curiosity about this approach, but not that specific question. I understand that making a Person a Pair<...> is just an implementation detail (ok, this brings to the discussion about using the inheritance for implementing something, and it's one of my questions), so we shouldn't read it "Person is a kind of Pair". To solve the problem at code level, one could imagine some compiler trick for generate code implemented in Lombok. Of course, if you're doing something hidden behind the compiler, one might question whether there are better implementations than Pair<...>

So, my first question is: what's the target which we're aiming at? From the original post I only read: good hashcode/equals, immutability. Are there other things? If one resorts to Lombok, it could have Guavac to take care of them in other ways.

So, I'd exclude that a Lombokized approach to the thing is a valued option for Pair<...>. At this point, I don't exactly understand "strong typing": of course, strong typing when using Person is given by the fact that Person declares Strings and ints. The strong typing coming from Pair<...> seems only related to the implementation.

--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
java.net/blog/fabriziogiudici - www.tidalwave.it/people
[email protected]

--
You received this message because you are subscribed to the Google Groups "The Java 
Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to