[Top][All Lists]

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

Re: can `shuffle-vector' be moved?

From: Stefan Monnier
Subject: Re: can `shuffle-vector' be moved?
Date: Fri, 13 May 2011 12:26:34 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

KR> ;; These are extensions to Emacs Lisp that provide a degree of
KR> ;; Common Lisp compatibility, beyond what is already built-in
KR> ;; in Emacs Lisp.

> OK.  Can there be a cl-macs-extras.el for "general cl-macs based code
> that is safe to include in ELisp code"?

I really have no idea why you want it in cl-macs:
1- the "macs" part refers to "macros", your function isn't one.
2- it does not provide a CL-style function.
3- using a CL macro in its definition is a property share by a lot more
   code than just the CL code.  And actually, the cl*.el files tend not
   to use CL features, to avoid circular dependencies.

SM> I really meant "similar": if no other code uses this functionality,
SM> advertising its existence is not going to increase its use.
> I also see lisp/calc/calc-comb.el:math-shuffle-list but you're right,
> it's not commonly needed.  I still don't think it belongs in cookie1.el,
> if only because the name is general and not library-specific,

It should probably be called cookie-shuffle-vector, indeed.

> but that's an inconsistency all the cookie1.el functions have.

The only other function I see in cookie1.el that does not use the
"cookie-" prefix is "read-cookie", which is borderline acceptable (we
have a few such "shared prefixes" like "turn-on-").  So,
`shuffle-vector' does indeed stand out.  And the fact that it's
autoloaded is a clear sign it is intended to be used by other packages.
But I see no good place to put it right now, and I don't think it
deserves creating a "misc-lib.el" for itself (although some of the
functions in subr.el might be good candidates for such a new package).


reply via email to

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