[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why aren't there functions such as filter, take-while, etc. "by def
Re: Why aren't there functions such as filter, take-while, etc. "by default"?
Sun, 25 Apr 2010 21:09:49 +0200
Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux)
David Kastrup <address@hidden> writes:
> Deniz Dogan <address@hidden> writes:
>> Why does it have to be so hard to write Emacs Lisp without requiring cl?
>> Why aren't there functions such as filter (the equivalent of
>> remove-if-not in cl-seq.el), take-while, reduce etc. "native" in
> They make for no-surprise efficient programs primarily when the language
> has lexical closures.
What about `case', though?
It's ridiculous -- you have to either define helpers again and again all
the time, or write unnecessarily verbose code, or require the whole of
cl (and I don't think `eval-when-compile' makes so much of a difference
outside Emacs core; it's not like people compile all third-party
packages they use).
The Emacs cl.el "policy" seems rather schizophrenic to me -- if there's
something unsatisfactory about it, then it should be fixed instead of
being banished to compile-time-only. Or failing that, some generally
useful forms like the above should be provided in Emacs core.