commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bob mcwhirter <>
Subject RE: [lang] Ideas for Lang
Date Mon, 14 Oct 2002 18:26:13 GMT
> > 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...


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message