[plt-dev] cons*, why not?

From: Eli Barzilay (eli at barzilay.org)
Date: Sun Jul 12 11:50:59 EDT 2009

On Jul 12, Paulo J. Matos wrote:
> On Sun, 2009-07-12 at 10:43 -0400, Carl Eastlund wrote:
> > We call it list*.
> > 
> 
> Missed that... thanks!
> However, can't understand why list* when cons* seems a better name.

1. `list*' is older IME -- it had been part of mzscheme and every
   other scheme implementation I worked with, and it is "even" part of
   CL.  I have never seen `cons*' before srfi-1.

2. You can see this raised on the very first message to the srfi-1
   list, http://srfi.schemers.org/srfi-1/mail-archive/msg00000.html
   with a suggestion to include both since they are "equally popular".
   At the time, only `list*' was suggested.

   Later, Olin simply said "General consensus is that CONS* is a
   better name. I have changed the name accordingly".  That's in
   http://srfi.schemers.org/srfi-1/mail-archive/msg00033.html .

3. IMO `list*' works much better -- and sets a nice precedent for
   `append*' and `string-append*' which we have now.  (The first is
   extremely useful, and was suggested by Ryan.)  `cons*' does not
   provide the same precedent.

4. In fact, the only justification I see for `cons*' is that you can
   write bad things like (cons* 1 2) and (cons* 1 2 3 4 5).  This is
   also the explanation in that first message to the srfi list ("while
   CONS* may suggest that the result could be an improper list").

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the dev mailing list.