Re: Reminder, blatant ad
Date: Mon, 6 Feb 2006 18:00:49 +0200
"dawn" <dawnwolthuis_at_gmail.com> wrote in message
> Marshall Spight wrote:
> > dawn wrote:
> > > x wrote:
> > > >
> > > > > > What are the basic operations for combining lists and sets ?
> > > >
> > > > > The ones that come with any general purpose programming language.
> > > > Can you make a list or a set with them and post it ?
> > >
> > > That would take a smarter man than I. I'd be fine with the java.lang
> > > libraries. They are well documented. ;-)
> > (You probably meant java.util; specifically the "Collections API.")
> My thinking was muddled right then, I suspect, but I started with the
> collections api and did have java.util but before sending it figured I
> only needed the basic language and could build up from there. But,
> yes, I was initially thinking of the collections api.
> > The collections API is quite an achievement, and is IMHO a significant
> > contributor to Java's overall success. But it doesn't qualify
> > as a foundational set of operations. It's goal is maximal inclusiveness
> > and convenience; not minimal completeness.
> Yes, it is very useful. Someone once mentioned that it does not have
> relations. However, with maps, which are functions, you could
> implement any relation that is a function (any with a primary key). It
> just doesn't have the same operations on that map as on relations in an
> > I think a good case can be made for the basic operations on set
> > being the union, intersection, difference; for relations being the
> > relational algebra, and for lists being simply car, cdr, cons.
> > How you would combine operations on lists and sets is an
> > open question in my mind. Can natural join be applied to
> > a pair of lists?
I have looked at java.util and I have not seen any collection constructor with at least two collections as parameters or any method that take two collection and return one from them. All I have seen are methods for working on collections with one element at the time, for sorting , for conversion, equality and inclusion testing and this wonderful piece of work: http://java.sun.com/j2se/1.4.2/docs/guide/collections/designfaq.html#14 http://java.sun.com/j2se/1.4.2/docs/guide/collections/designfaq.html#6 Received on Mon Feb 06 2006 - 17:00:49 CET