[plt-scheme] SRFI-1 move to scheme/list?

From: Corey Sweeney (corey.sweeney at gmail.com)
Date: Sun Jan 27 21:12:07 EST 2008

Ok, i'm a little late getting in on this, but if I understand the
discussion right, I think people are promoting the non-standard
list.ss over the standardized SRFI-1, and the standardized R6RS list
library.  I would like to remind that many of us who write code will
prefer a standardized library when developing, so that when things go
wrong and we need to port to a differnt scheme, that you don't have to
spend time trying to write  a "list.ss->srfi-1 shim".  Wether it's
srfi-1 or a R6RS lib dosn't matter, but just that it's some kind of
standard that we'll be able to find implemented other places.

So rather then having to pull in each function from SRFI-1 each time
you use it, (which is extremely annoying) it would be much better to
be able to require SRFI-1, and just pull those individual functions
you like from list.ss

[For those who havn't tried srif-1, and don't know what i'm talking
about, SRFI-1 often will not load, which i believe is due to the
standard "first" funtion being exported by list.ss, not srfi-1.  This
tends to causes things like (require (only (lib "1.ss" "srfi") thid
fourth fifth fold any every take take-right ... {list goes on and on})
to happen]

Corey

On Jan 20, 2008 9:42 AM, Eli Barzilay <eli at barzilay.org> wrote:
> On Jan 19, Noel Welsh wrote:
> > On Jan 19, 2008 2:23 PM, Michael Sperber <sperber at deinprogramm.de> wrote:
> > > If there are differences, and requiring (lib "1.ss" "srfi") gets you
> > > procedures that aren't conformant with SRFI 1, that's a big problem.  I
> > > recommend strongly against it.
> >
> > Agreed.  To clarify my suggestion is merely that scheme/list become
> > more complete.  To me, complete means "does what SRFI-1 does with
> > appropriate changes to match existing convention in scheme/list",
> > but I am open to other definitions of complete, such as stealing
> > from the R6RS list library, or the Haskell library, or
> > Your-Favourite-Library-Here.
>
> OK, I think that there's an alternative solution that works fine: a
> require macro that allows you to do this:
>
>   #lang scheme/base
>   (require (overriding-in srfi/1 scheme/base scheme/list))
>
> where the `overriding-in' macro arranges to not require identifiers
> from earlier specs that appear in the following ones.  This makes the
> above require grab things from srfi/1 that are not already in
> `scheme/base' or `scheme/list'.  (`scheme/base' is therefore required
> twice, but it's allowed if it comes from the same place.)
>
> Then, work on extending `scheme/list' so that it includes more stuff,
> and make it so that `srfi/1' is needed less overall.
>
> --
>           ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
>                   http://www.barzilay.org/                 Maze is Life!
> _________________________________________________
>
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>



-- 
((lambda (y) (y y)) (lambda (y) (y y)))


Posted on the users mailing list.