On 2/20/07, Raymond Toy <raymond.toy at ericsson.com> wrote:
>
> Also, I see that you've replaced (memq x foo) everywhere with (member
> x foo :test #'eq). Is that really necessary? If you're always using
> :test #'eq, I think memq is a natural expression of that idea.
I agree with Ray. Memq is a perfectly reasonable function to have around --
looking for a symbol in a list of things is a common and meaningful
operation. The fact that it can be defined in terms of the more general CL
member function is neither here nor there.
CL is a library of useful functions. That doesn't mean that we can't define
our own useful functions as well. I would hate to see (while foo ...) be
blindly rewritten as (do () ((not foo)) ...) just because CL happens not to
define 'while'. While is a cleaner, simpler way of expressing that special
case. That's what Lisp is all about, isn't it?
Then again, there are some purely syntactic things that would be nice to
modernize, even if they are legal CL. Inline lambdas like
((lambda (a b c)
... big block of code...)
aval
bval
cval)
should definitely be replaced by let's. The only reason the code was
written that way was because let didn't exist....
On the other hand, a lot of Maxima's naming conventions for its own
functions are perverse and confusing. Why is the equivalent of equal alike1
rather than alike, for example?
-s