> > I was hoping there might be a good Lisp fanatic or something with some
> > reasons for why a Pair object would be very useful. I seem to recall
> > reading someone's blog opining for a Pair class.
> 
> Well, you could certainly do lists the LISP way with a Pair class. One
> element is the CAR and the other is the CDR. Then you could build the other
> list operations on top of it quite simply. That's not to say this is a good
> idea, but you *could*. ;-)

Also, for some hysterical perspective, I believe the STL returned an
Iterator<Pair<KEY,VALUE> > from Map::iterator().

> Of course, this begs the question of what *do* you call the elements of a
> generic Pair class, to avoid implying any semantic. I guess you can't really
> go far beyond 'obj1' and 'obj2'.

Yes, I believe the STL's Pair had getFirst() and getSecond().

We're not breaking new ground here...

        -bob


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to