From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Should `position' be implemented in Emacs core and preloaded? Date: Wed, 05 Oct 2016 11:50:55 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1475683128 26493 195.159.176.226 (5 Oct 2016 15:58:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 5 Oct 2016 15:58:48 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 05 17:58:44 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1broaV-000557-4k for ged-emacs-devel@m.gmane.org; Wed, 05 Oct 2016 17:58:31 +0200 Original-Received: from localhost ([::1]:49985 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1broaT-000679-MH for ged-emacs-devel@m.gmane.org; Wed, 05 Oct 2016 11:58:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1broTq-0000Rl-Tg for emacs-devel@gnu.org; Wed, 05 Oct 2016 11:51:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1broTn-0002TX-MJ for emacs-devel@gnu.org; Wed, 05 Oct 2016 11:51:38 -0400 Original-Received: from [195.159.176.226] (port=56616 helo=blaine.gmane.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1broTn-0002Rp-Eg for emacs-devel@gnu.org; Wed, 05 Oct 2016 11:51:35 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1broTD-00057I-8b for emacs-devel@gnu.org; Wed, 05 Oct 2016 17:50:59 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 26 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:UjtifhL+IfDGnvyPAf9hs9sVrJ0= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:208011 Archived-At: > What i meant is that it would be nice if people could use that kind of > useful functions without face resistances. I saw before > in this list people who wanted to use a function from cl-lib or seq.el, > and they received objections because that would force that file to > require such lib. Normally such resistance only appears when it would require preloading seq or cl-lib (i.e. when it's used by a file which is itself preloaded). I think preloading seq.el would be OK under the following conditions: - seq.el is changed so as not to require cl-lib (that's mostly a question of moving shared code between the two libs so that it's in seq.el instead of in cl-lib, so it shouldn't be too difficult). - one of the preloaded files really benefits from seq.el. >> Also, FWIW, I don't see many uses of these cl/seq-position functions >> in Emacs, so I'm not sure how important they are, really. > I suspect that one important reason to not appear widely is exactly > that in order to use them we need to require the lib to use it. You might be right. I guess there's also the fact that on singly-linked lists, using seq-position is rarely the best way (in terms of efficiency) to get the job done. Stefan