[plt-scheme] SRFI-1 move to scheme/list?
On Jan 19, Michael Sperber wrote:
>
> Eli Barzilay <eli at barzilay.org> writes:
>
> > On Jan 18, Noel Welsh wrote:
> >> On Jan 18, 2008 3:58 PM, Eli Barzilay <eli at barzilay.org> wrote:
> >> > What about the subtle differences in behavior? For example:
> >> >
> >> > Welcome to MzScheme v3.99.0.9 [3m], Copyright (c) 2004-2008 PLT Scheme Inc.
> >> > > (require scheme/list)
> >> > > (require (prefix-in s: srfi/1))
> >> > > (s:second (list* 1 2 3 4))
> >> > 2
> >> > > (second (list* 1 2 3 4))
> >> > second: expected argument of type <list>; given (1 2 3 . 4)
> >>
> >> I expect many people don't care about these differences.
> >
> > Well, I should have phrased my question differently -- is there any
> > such differences that people will care about? (Alternatively, are
> > there any such differences that matter in cases where "you get what
> > you deserve for doing X" is not a good answer, as in the above.)
>
> If there are differences,
I saw more significant differences later. Two that I remember are:
`assoc' has an optional argument for the function; `map' stops on the
shortest list. These seem substantial enough to make it impractical
to merge things either way.
> 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.
I agree with that, given changes like the above.
> (It seems changing the "list.ss" import wouldn't be that much of a
> problem.)
Not if it's supposed to do any of the three differences above.
> I generally recommend importing only specific procedures from SRFI
> 1, given its size and the genericness of its names.
This sounds reasonable.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!