From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas Petton Newsgroups: gmane.emacs.devel Subject: Re: sequence manipulation functions Date: Wed, 05 Nov 2014 16:36:58 +0100 Message-ID: <87bnolslph.fsf@gmail.com> References: <87oasmmwzt.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1415201894 31211 80.91.229.3 (5 Nov 2014 15:38:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Nov 2014 15:38:14 +0000 (UTC) Cc: Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 05 16:38:09 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xm2et-0007gf-H0 for ged-emacs-devel@m.gmane.org; Wed, 05 Nov 2014 16:38:08 +0100 Original-Received: from localhost ([::1]:47073 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xm2es-0004NX-QB for ged-emacs-devel@m.gmane.org; Wed, 05 Nov 2014 10:38:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51335) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xm2du-0003Ru-8E for emacs-devel@gnu.org; Wed, 05 Nov 2014 10:37:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xm2dp-0005qp-JS for emacs-devel@gnu.org; Wed, 05 Nov 2014 10:37:06 -0500 Original-Received: from mail-lb0-x234.google.com ([2a00:1450:4010:c04::234]:34555) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xm2dp-0005qh-95 for emacs-devel@gnu.org; Wed, 05 Nov 2014 10:37:01 -0500 Original-Received: by mail-lb0-f180.google.com with SMTP id u10so851456lbd.25 for ; Wed, 05 Nov 2014 07:36:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-type; bh=d1uGR4xnf0WcXdz1fUOhuwYPlQEWfsp6OxyvAvcbIEo=; b=YLQcxDoosQEqoakxa71D9DByKS+g9Ot5muD2rZ+v/bwteDtkd57GbTU9mSSaFBQ2vP r8yWKzjrKx4je77gLLoEBZmKR/bOMgZmDzRWZ1VenoH1AmFJ4LkFNOdUqD+LsYLQc240 +378PK0zitr03xH7Ks3utKWn5T3KYsYzbPfkgXyE+Fp63yZ5UVDO1m3Yh+BHpfpICPTQ trPLQaYviFIpb19YzJYduJXlvjZu/M/Fa4pXbd9Ol/9vJIVsu0ezgQK2oOldJXU1SJc0 ZbVUIfIKNvp76YFwOim5q817QkS6+NBEvzTR7pIUUXIzssfrAhHkaV7j6EsWDLHNBL8m zGxg== X-Received: by 10.112.199.40 with SMTP id jh8mr62991530lbc.5.1415201819731; Wed, 05 Nov 2014 07:36:59 -0800 (PST) Original-Received: from blueberry ([31.211.216.84]) by mx.google.com with ESMTPSA id v7sm1434554lbp.44.2014.11.05.07.36.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Nov 2014 07:36:59 -0800 (PST) User-agent: mu4e 0.9.9.6pre3; emacs 24.3.1 In-reply-to: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:176406 Archived-At: Stefan Monnier 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