emacs-devel
[Top][All Lists]
Advanced

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

Re: sequence manipulation functions


From: Nicolas Petton
Subject: Re: sequence manipulation functions
Date: Wed, 05 Nov 2014 16:36:58 +0100
User-agent: mu4e 0.9.9.6pre3; emacs 24.3.1

Stefan Monnier <address@hidden> writes:

Thank you for your feedback.

>> Here are two files that add some missing sequence-manipulation functions
>> to Emacs Lisp.
>
> I think these should use a "seq-" prefix.  This will not only avoid
> naming conflicts, but also helps discover those functions, since you can
> type `(seq- TAB' to see all related functions.

I understand your point. Then what do you think about having all other
sequence functions prefixed with "seq-"? Maybe with the exception of
some really basic ones like "mapcar". For backward-compatibility, I
could keep the current names as aliases, and maybe later obsolete them.

>
>> ;;; Commentary:
>>
>> ;; Sequence manipulation functions
>
> No need to repeat the title here.
>
>> ;;;###autoload
>
> It seems that pretty much all functions in this file are marked
> as ;;;###autoload.  In that case I think it's better to not mark any of
> them as autoloaded.

Yes, you are right.

>
>> (defun rest (seq)
>>   "Return all but the first element of the sequence SEQ.
>> If SEQ is nil or empty, return nil."
>
> The different of cost between "rest of a list" and "rest of an array" is
> so large that merging the two this way is probably not a good idea.

Do you mean that the implementation is lacking in some way or that you
would remove the "rest" function all together?


Nico
-- 
Nicolas Petton
http://nicolas-petton.fr




reply via email to

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