Reasons for withdrawal scgmille@xxxxxx (28 Oct 2003 20:35 UTC)
Re: Reasons for withdrawal Tom Lord (28 Oct 2003 21:24 UTC)
RE: Reasons for withdrawal Anton van Straaten (28 Oct 2003 22:05 UTC)
Re: Reasons for withdrawal Bradd W. Szonye (28 Oct 2003 22:36 UTC)
Re: Reasons for withdrawal scgmille@xxxxxx (28 Oct 2003 22:44 UTC)
Re: Reasons for withdrawal Bradd W. Szonye (28 Oct 2003 23:22 UTC)
Re: Reasons for withdrawal Tom Lord (29 Oct 2003 02:50 UTC)
Re: Reasons for withdrawal scgmille@xxxxxx (29 Oct 2003 03:19 UTC)
Re: Reasons for withdrawal Tom Lord (29 Oct 2003 03:31 UTC)
Re: Reasons for withdrawal scgmille@xxxxxx (29 Oct 2003 03:38 UTC)
Re: Reasons for withdrawal Bradd W. Szonye (29 Oct 2003 04:36 UTC)
Re: Reasons for withdrawal scgmille@xxxxxx (29 Oct 2003 05:02 UTC)
Re: Reasons for withdrawal Bradd W. Szonye (29 Oct 2003 05:32 UTC)
Re: Reasons for withdrawal Taylor Campbell (28 Oct 2003 22:56 UTC)
Re: Reasons for withdrawal Taylor Campbell (28 Oct 2003 23:06 UTC)
Re: Reasons for withdrawal Bradd W. Szonye (28 Oct 2003 23:16 UTC)
Re: Reasons for withdrawal scgmille@xxxxxx (28 Oct 2003 23:28 UTC)
Re: Reasons for withdrawal Bradd W. Szonye (28 Oct 2003 23:42 UTC)
Re: Reasons for withdrawal scgmille@xxxxxx (29 Oct 2003 00:13 UTC)
Re: Reasons for withdrawal Bradd W. Szonye (29 Oct 2003 01:00 UTC)
Re: Reasons for withdrawal scgmille@xxxxxx (29 Oct 2003 01:41 UTC)
Re: Reasons for withdrawal Tom Lord (29 Oct 2003 03:03 UTC)
RE: Reasons for withdrawal Anton van Straaten (29 Oct 2003 05:31 UTC)
Re: Reasons for withdrawal Bradd W. Szonye (29 Oct 2003 05:54 UTC)
RE: Reasons for withdrawal Anton van Straaten (29 Oct 2003 06:40 UTC)
Re: Reasons for withdrawal Bradd W. Szonye (29 Oct 2003 06:44 UTC)
RE: Reasons for withdrawal Anton van Straaten (29 Oct 2003 07:31 UTC)
Re: Reasons for withdrawal Bradd W. Szonye (29 Oct 2003 07:34 UTC)
Re: Reasons for withdrawal Thien-Thi Nguyen (29 Oct 2003 14:08 UTC)
Re: Reasons for withdrawal Bradd W. Szonye (28 Oct 2003 21:28 UTC)
Re: Reasons for withdrawal scgmille@xxxxxx (28 Oct 2003 22:02 UTC)
Re: Reasons for withdrawal Bradd W. Szonye (28 Oct 2003 22:22 UTC)
Re: Reasons for withdrawal Jim White (28 Oct 2003 22:15 UTC)
Re: Reasons for withdrawal Shiro Kawai (29 Oct 2003 01:25 UTC)
Re: Reasons for withdrawal scgmille@xxxxxx (29 Oct 2003 01:44 UTC)
Re: Reasons for withdrawal Bradd W. Szonye (29 Oct 2003 04:10 UTC)
Re: Reasons for withdrawal scgmille@xxxxxx (29 Oct 2003 04:53 UTC)
Re: Reasons for withdrawal Bradd W. Szonye (29 Oct 2003 05:10 UTC)
Re: Reasons for withdrawal scgmille@xxxxxx (29 Oct 2003 05:17 UTC)
Re: Reasons for withdrawal Bradd W. Szonye (29 Oct 2003 05:31 UTC)
Re: Reasons for withdrawal scgmille@xxxxxx (29 Oct 2003 01:49 UTC)
API conflicts (Was: Re: Reasons for withdrawal) Shiro Kawai (29 Oct 2003 05:48 UTC)
Re: API conflicts Shiro Kawai (29 Oct 2003 06:03 UTC)
Re: API conflicts scgmille@xxxxxx (29 Oct 2003 17:40 UTC)
Re: API conflicts (Was: Re: Reasons for withdrawal) Bradd W. Szonye (29 Oct 2003 06:03 UTC)
Re: API conflicts (Was: Re: Reasons for withdrawal) scgmille@xxxxxx (29 Oct 2003 14:19 UTC)
Re: API conflicts Shiro Kawai (29 Oct 2003 22:25 UTC)
Re: API conflicts scgmille@xxxxxx (29 Oct 2003 22:41 UTC)
Re: API conflicts Taylor Campbell (29 Oct 2003 23:58 UTC)
Re: API conflicts (Was: Re: Reasons for withdrawal) Taylor Campbell (29 Oct 2003 21:40 UTC)
A possible solution? bear (29 Oct 2003 22:59 UTC)
RE: A possible solution? Anton van Straaten (30 Oct 2003 07:40 UTC)
Re: A possible solution? Bradd W. Szonye (30 Oct 2003 10:07 UTC)
RE: A possible solution? bear (30 Oct 2003 15:13 UTC)
Re: A possible solution? scgmille@xxxxxx (30 Oct 2003 15:20 UTC)
Re: A possible solution? Bradd W. Szonye (30 Oct 2003 15:27 UTC)
Re: A possible solution? scgmille@xxxxxx (30 Oct 2003 15:39 UTC)
Re: A possible solution? Bradd W. Szonye (30 Oct 2003 15:43 UTC)
Re: A possible solution? scgmille@xxxxxx (30 Oct 2003 16:11 UTC)
Re: A possible solution? bear (30 Oct 2003 17:02 UTC)
Re: A possible solution? Tom Lord (30 Oct 2003 19:58 UTC)
Re: A possible solution? scgmille@xxxxxx (30 Oct 2003 20:15 UTC)
Re: A possible solution? bear (30 Oct 2003 20:53 UTC)
Re: A possible solution? scgmille@xxxxxx (30 Oct 2003 21:07 UTC)
Re: A possible solution? Taylor Campbell (30 Oct 2003 21:08 UTC)
Re: A possible solution? Bradd W. Szonye (30 Oct 2003 21:11 UTC)
Re: A possible solution? scgmille@xxxxxx (30 Oct 2003 21:17 UTC)
Re: A possible solution? bear (30 Oct 2003 23:11 UTC)
Re: A possible solution? Alex Shinn (31 Oct 2003 03:03 UTC)
Re: API conflicts Shiro Kawai (29 Oct 2003 23:19 UTC)
Re: API conflicts scgmille@xxxxxx (30 Oct 2003 00:26 UTC)
Re: API conflicts Bradd W. Szonye (30 Oct 2003 05:32 UTC)
Re: API conflicts bear (30 Oct 2003 06:22 UTC)
Re: API conflicts Bradd W. Szonye (30 Oct 2003 06:23 UTC)
Re: API conflicts scgmille@xxxxxx (30 Oct 2003 13:54 UTC)
Re: API conflicts Bradd W. Szonye (30 Oct 2003 14:01 UTC)
Re: API conflicts scgmille@xxxxxx (30 Oct 2003 14:16 UTC)
Re: API conflicts Bradd W. Szonye (30 Oct 2003 14:29 UTC)
Re: API conflicts scgmille@xxxxxx (30 Oct 2003 14:58 UTC)
Re: API conflicts Bradd W. Szonye (30 Oct 2003 15:22 UTC)
Re: Reasons for withdrawal Tom Lord (29 Oct 2003 01:50 UTC)
Re: Reasons for withdrawal Alex Shinn (29 Oct 2003 03:06 UTC)
Re: Reasons for withdrawal scgmille@xxxxxx (29 Oct 2003 03:18 UTC)
Re: Reasons for withdrawal Tom Lord (29 Oct 2003 03:29 UTC)
Re: Reasons for withdrawal scgmille@xxxxxx (29 Oct 2003 03:37 UTC)
Re: Reasons for withdrawal Alex Shinn (29 Oct 2003 06:16 UTC)
Re: Reasons for withdrawal scgmille@xxxxxx (29 Oct 2003 14:25 UTC)
Re: Reasons for withdrawal Alex Shinn (30 Oct 2003 02:19 UTC)
Re: Reasons for withdrawal scgmille@xxxxxx (30 Oct 2003 04:42 UTC)
Re: Reasons for withdrawal Alex Shinn (30 Oct 2003 06:22 UTC)

Re: Reasons for withdrawal Alex Shinn 30 Oct 2003 06:18 UTC

At Wed, 29 Oct 2003 22:42:25 -0600, xxxxxx@freenetproject.org wrote:
>
> On Thu, Oct 30, 2003 at 11:14:52AM +0900, Alex Shinn wrote:
> >
> >    1) single vs. multiple inheritance
> >        - just say single!
> >        - if multiple, what CPL do you use?
>
> Lets say single.  Its conceivable that a datastructure could support
> more than one type (list set, list bag), but I think that in that case
> you just make two collections instead.

A more common example might be the hash-table (dictionary) + av-tree
(sequence), which allows you both O(1) access and O(n) ordered
enumeration.  The order can be either a < predicate or by insertion
order into the dictionary.  These are actually fairly useful data types
that Perl, for a start, has standard modules for.

You can get around this without multiple inheritance though, it just
bloats your hierarchy and code a little.

> >    2) single vs. multiple dispatch
> >        - multiple is probably needed for *-union, etc.
> >        - if multiple, how do you resolve conflicts?
>
> Could you illuminate a potential conflict (I believe you, I just want
> some concrete things to think about).

Given

  (collection= <set> <bag>)

do you dispatch on the <set> or on the <bag>?  Do you allow overloading
a dispatch for the particular case of <set> & <bag>?

Also

  (add-all <bag-of-apples> <bag-of-oranges>)

  (intersection <set-of-primes> <set-of-2^n-1>)

etc.

> >    3) abstract vs. concrete
> >        - can concrete classes be sub-classed?
> I would like to say no, for simplicity.  You could subclass in the
> implementation in order to make two collections, but two concrete
> collections cannot inherit from each other, only from the generic super
> classes.  I could be argued out of this position.

Well, this makes getting around single inheritance harder.

> >        - can new abstract classes be made?
> Sure.  It merely implies a new set of generic operators.

OK.  I forgot to ask about new methods - are they allowed?

The next thing the SRFI really should provide is the syntax for the
above operations, like (define-collection-type ...), otherwise you are
precluding in advance any extensions from being portable.  They would
have to go through non-trivial rewriting for every dispatch
implementation they are to be ported to.

--
Alex