grz01 wrote:
2) writing their individual and mutually
incompatible, almost identical versions of
my.useful.goodies.package.Pair<A,B>
or
my.other.goodies.package.Triple<A,B,C>
Seriously, aside from the example that I just wrote for you, never. I've
always defined a type that had some other meaning besides "I'm holding
these types for someone else."
For example the last "pair" I designed was for a time keeping
application. I had two longs, and I needed to determine how much time
existed between them. I didn't use an array or a generic "Pair", I made
a class called "Interval" and put the start time and end time in that.
Simple, easy, and described the problem space almost intuitively.
joint meaning.