From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: lexical-binding questions Date: Mon, 07 May 2012 11:19:55 -0400 Message-ID: References: <871umzrvfw.fsf@gmail.com> <87y5p64o3v.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1336404019 21774 80.91.229.3 (7 May 2012 15:20:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 7 May 2012 15:20:19 +0000 (UTC) Cc: emacs-devel@gnu.org To: Thierry Volpiatto Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 07 17:20:19 2012 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 1SRPjU-000351-Da for ged-emacs-devel@m.gmane.org; Mon, 07 May 2012 17:20:16 +0200 Original-Received: from localhost ([::1]:59195 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRPjT-0005o3-LQ for ged-emacs-devel@m.gmane.org; Mon, 07 May 2012 11:20:15 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49022) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRPjP-0005nf-4L for emacs-devel@gnu.org; Mon, 07 May 2012 11:20:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SRPjI-00076I-Iy for emacs-devel@gnu.org; Mon, 07 May 2012 11:20:10 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:58786) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRPjI-00073B-ES for emacs-devel@gnu.org; Mon, 07 May 2012 11:20:04 -0400 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q47FJt6n021993; Mon, 7 May 2012 11:19:55 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id B20AEAEC0E; Mon, 7 May 2012 11:19:55 -0400 (EDT) In-Reply-To: <87y5p64o3v.fsf@gmail.com> (Thierry Volpiatto's message of "Sat, 05 May 2012 17:57:40 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4215=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4215> : streams <753686> : uri <1108549> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:150354 Archived-At: > Now we have lexical-binding in Emacs, it could be nice to implement the > declare features of CL. (inline too) Just because CL has lexical-scoping doesn't mean that Elisp added lexical scoping to be more like CL ;-) Regarding `inline': I hate defsubst and would rather encourage people not to use it, because Elisp supports much too poorly (it doesn't do what you want when you try to use ELP, trace-function, debug-on-entry, defadvice, etc...). A much more productive patch would be to speed up function calls from byte-code functions to byte-code functions by performing them without leaving the byte-code interpreter (currently the code does a ridiculous dance where the byte-code interpreter takes the args from the byte-code stack, passes them to Ffuncall which calls funcall_lambda which then calls exec_byte_code which sets up a new byte-code stack and copies the args to this new stack, to finally run the destination byte-code). Stefan