emacs-devel
[Top][All Lists]
Advanced

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

RE: CL package serious deficiencies


From: Drew Adams
Subject: RE: CL package serious deficiencies
Date: Fri, 10 Feb 2012 08:23:25 -0800

> Elisp sort of has keyword arguments.  They just aren't part of the
> language, so they are reimplemented by hand in various functions.
> You can find many examples in Emacs, including even functions in C,
> e.g., dbus-call-method or make-network-process.

Right.

It might also be worth distinguishing (a) the relative lack/dearth of
function-valued arguments that have the effect of certain important keyword
args, such as :test and :key from (b) the lack of support for keyword arguments
per se.

I like CL keyword arguments personally, but I think that (a) is more important
than (b), if there is pushback for such stuff.

Example: It is far more important to have a sequence function that accepts a
function-valued TEST argument than it is to be able to pass it such an argument
using the keyword :test.  Being able to pass args in any order by specifying
them using keywords (e.g. :test) is, in my book, less important.

Yes, keywords can be convenient and sometimes less verbose (yes), but what's
really missing IMO are the Common-Lisp sequence etc. functions that accept such
function-valued args, and not the fact that you can pass those args using
keywords.

I could be wrong, but my guess is that Richard's resistance to keyword args is
mainly about (b), not (a), that is, the use of keywords per se, and not general
sequence etc. functions that accept function-valued args.

Emacs Lisp does have some functions that accept functions as args, of course,
but the language has generally not been optimized to support passing functional
args, so the use of such higher-order functions has been somewhat limited in
practice.

Support for lexical binding changes that game, opening more possibilities.  But
additional work would be needed to really make such Common-Lisp thingies
performant in Emacs Lisp.




reply via email to

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