From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "John Wiegley" Newsgroups: gmane.emacs.devel Subject: Re: [SUSPECTED SPAM] Re: [Emacs-diffs] scratch/widen-less a4ba846: Replace prog-widen with consolidating widen calls Date: Wed, 20 Dec 2017 17:33:51 -0800 Message-ID: References: <20171129233237.27462.23351@vcs0.savannah.gnu.org> <83o9nexy48.fsf@gnu.org> <83d13uxug5.fsf@gnu.org> <41e3f343-816f-d2db-6575-6ef43d54957f@yandex.ru> <838tecuqjb.fsf@gnu.org> <83609etizl.fsf@gnu.org> <83wp1ts123.fsf@gnu.org> <1e8587a7-c98b-5183-3cfd-8e1034443f44@yandex.ru> <83shchrwia.fsf@gnu.org> <83lgi9ruo8.fsf@gnu.org> <01c15d4e-566b-3b7f-c4e6-6f199ba5bcc3@yandex.ru> <89c4a839-a124-a1a8-5cf9-583baf2b4dd6@yandex.ru> <0546455b-c757-5673-1888-66990127c7e6@yandex.ru> <8eb73f61-1ad0-da9c-98d9-36e30d86a7bf@yandex.ru> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1513819936 15597 195.159.176.226 (21 Dec 2017 01:32:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 21 Dec 2017 01:32:16 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (darwin) Cc: Eli Zaretskii , monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 21 02:32:12 2017 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 1eRpiT-0003Pw-4v for ged-emacs-devel@m.gmane.org; Thu, 21 Dec 2017 02:32:09 +0100 Original-Received: from localhost ([::1]:51876 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRpkP-0006P4-On for ged-emacs-devel@m.gmane.org; Wed, 20 Dec 2017 20:34:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRpkI-0006OU-0s for emacs-devel@gnu.org; Wed, 20 Dec 2017 20:34:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRpkE-00080P-UO for emacs-devel@gnu.org; Wed, 20 Dec 2017 20:34:02 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRpkE-00080K-Qi; Wed, 20 Dec 2017 20:33:58 -0500 Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:47509) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1eRpkE-0001ai-Fc; Wed, 20 Dec 2017 20:33:58 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id D6DDA211FB; Wed, 20 Dec 2017 20:33:55 -0500 (EST) Original-Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Wed, 20 Dec 2017 20:33:55 -0500 X-ME-Sender: Original-Received: from localhost (76-234-69-149.lightspeed.frokca.sbcglobal.net [76.234.69.149]) by mail.messagingengine.com (Postfix) with ESMTPA id 6D5577E538; Wed, 20 Dec 2017 20:33:55 -0500 (EST) In-Reply-To: <8eb73f61-1ad0-da9c-98d9-36e30d86a7bf@yandex.ru> (Dmitry Gutov's message of "Thu, 21 Dec 2017 00:30:21 +0200") Mail-Followup-To: Dmitry Gutov , Eli Zaretskii , monnier@iro.umontreal.ca, emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:221291 Archived-At: >>>>> "DG" =3D=3D Dmitry Gutov writes: DG> FWIW, I'm told define-inline is a better choice these days. Hmm... no docstring, although it's in the Elisp ref manual. Quoting from there: Functions defined via =E2=80=98define-inline=E2=80=99 have several advan= tages with respect to macros defined by =E2=80=98defsubst=E2=80=99 or =E2=80=98defm= acro=E2=80=99: =E2=88=92 They can be passed to =E2=80=98mapcar=E2=80=99 (*note Mapping = Functions::). =E2=88=92 They are more efficient. =E2=88=92 They can be used as =E2=80=9Cplace forms=E2=80=9D to store val= ues (*note Generalized Variables::). =E2=88=92 They behave in a more predictable way than =E2=80=98cl-defsubs= t=E2=80=99 (*note (cl)Argument Lists::). So, yeah. And I wouldn't really call using define-inline instead of defun f= or tiny functions "premature optimization" in cases like these. You're not changing the semantics of the function, just indicating it's small enough t= hat it should be inlined when byte-compiling. And you know the number of call sites too, so it won't cause code bloat. When it's that harmless, I usually= do it as a matter of convention in my own code. --=20 John Wiegley GPG fingerprint =3D 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2