Hi,

"Julian Graham" <[EMAIL PROTECTED]> writes:

> Oh, yeah, that's fine -- sorry, didn't realize that was the behavior
> of SCM_VALIDATE_LIST.  Just as long as it doesn't segfault any more,
> I'm happy.

Actually, there are many places where `SCM_VALIDATE_LIST' is used where
it should be avoided.  An example is SRFI-1's `member'.  Try the
following:

  (use-modules (srfi srfi-1)
               (ice-9 time))

  (define l (make-list 1000000 0))
  (time (not (not (member (car l) l))))

  ;; ... versus...

  (time (not (not (member 0 '(0)))))

Looking at SRFI-1 specifically, the spirit is apparently to phrase
things in a way that allows implementations to not actually check
whether arguments are proper lists when proper lists are expected (see,
e.g., [0, 1]).

Thanks,
Ludovic.

[0] http://srfi.schemers.org/srfi-1/mail-archive/msg00061.html

    "[I]t's unlikely that any implementation would ever enforce the
     proper-list typing of its list parameter."

[1] http://srfi.schemers.org/srfi-1/mail-archive/msg00054.html



Reply via email to