Subject: Re: general order of parameters
From: rpw3@rpw3.org (Rob Warnock)
Date: Wed, 16 Jul 2003 04:17:49 -0500
Newsgroups: comp.lang.scheme,comp.lang.lisp
Message-ID: <H5ucnZloAfeghYiiXTWc-g@speakeasy.net>
Lowell <lkirsh@cs.ubc.ca> wrote:
+---------------
| With some functions, the order seems natural and never gets mixed up. 
| For instance, the CL function 'nth' seems like it should be followed by 
| its numeric argument since the concept of nth-ness seems more closely 
| related to a number than a list. On the other hand, the (almost 
| identical) list-ref function feels natural having a list as its first arg.
+---------------

When learning Common Lisp, one must get used to the fact that when the
ANSI standard was being developed compatibility with existing Lisp
implementations & practice was (generally) deemed more important than
making every last little corner consistent in style [what some might
call "clean" -- others might say "too pure"]. As a result, there are
a number of such little oddities of function naming, argument-order,
and other little things that might have been done differently (and more
consistently) had there not already been a couple of decades of prior art. 

As another poster suggested, for your *own* code just pick a style
that seems natural to you and stick to it, without worrying too much
about the inconsistencies of CL itself. On the other hand, if you're
working from or extending a significant body of existing code that
clearly has an existing style of its own, then it's generally best
to simply adapt to that style and not gratuitously change it just
because you don't happen to like it as well as your own.


-Rob

-----
Rob Warnock, PP-ASEL-IA		<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607