help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: member returns list


From: Random832
Subject: Re: member returns list
Date: Sat, 05 Sep 2015 17:04:09 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin)

Emanuel Berg <embe8573@student.uu.se> writes:
> Because that is not more simple but on the contrary
> more complicated, and it would imply the same data
> (#'eq) appearing repeatedly in code blocks that
> qualitatively do the same thing.

How is this different from memq itself appearing repeatedly? Or the
substring -eq appearing repeatedly in your version in symbols like
member-eq and assoc-eq? (Or, for that matter, the letter "q" in the
actual ones) - common data to describe common behavior is a feature, not
a bug.

It's just like using a naming convention, only it makes it possible (and
obvious that it is possible) to substitute the comparison function with
your own function. It's simpler because instead of having two functions
to do two things with no obvious way to do the same thing with anything
else, you have one function that can easily discoverably do anything.

This would enforce being explicit about what comparison function is used
by naming the comparison function no matter what function you are using
it in, and not privilege eq and equal over other comparison
functions. We have memql but not assql; my version would let you pass
eql to anything.

CL allows a keyword-argument :test to accomplish this.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]