On Tue, Feb 04, 2003 at 09:13:37AM +0000, Christophe Rhodes wrote:
> "Paul F. Dietz" <dietz@...> writes:
> > Robert E. Brown wrote:
> > > I'm assuming of course that the checks for NIL optionals do not
> > > substantially slow down run times and that programmer productivity is viewed
> > > are more important than the last percent or two of performance.
> > I would assume that the checks are only really necessary
> > in unusual situations (APPLY or non-constant forms supplying
> > the keywords); in the common cases compiler macros should
> > be able to get rid of them.
> As a general point that's probably true. But as the person to touch
> code/seq.lisp most recently, I'd just like to say that there's a lot
> of code that would need to be updated for it (that is, that compiler
> macros can take care of all the normal cases of keyword argument
> passing) to be true in the case of all the sequence functions.
> This is because, as well as :TEST/:TEST-NOT canonicalization, there's
> also :START/:END canonicalization, :COUNT canonicalization and :KEY
> canonicalization to do. It *would* probably be a win to do those bits
> of it that are possible at compile-time for all of these functions,
> not just FIND and POSITION, but it's a lot of work...
OK, I don't know what to do about the other ones, but tentatively
I'm going to just say that arglists like :TEST NIL :TEST-NOT #'FOO
are illegal, on the reasoning that
(1) this interpretation seems to be as plausible as interpreting
them as legal, and
(2) :TEST-NOT is deprecated anyway, so it's hard to get motivated
to do anything fancy to support obscure uses of it, and
(3) this choice should be easy to implement (causing annoyances like
converting SBCL's own code not to make calls of this style,
but making reasonably readable code within list.lisp itself), and
(4) as Robert Brown wrote, it's not really doing users a favor to
silently accept constructs which aren't clearly portable.
But if anyone has a compelling argument against this approach --
especially if I'm wrong about (1) -- then please let me know.
William Harold Newman <william.newman@...>
Furious activity is no substitute for understanding. -- H. H. Williams
PGP key fingerprint 85 CE 1C BA 79 8D 51 8C B9 25 FB EE E0 C3 E5 7C