From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: lexical-binding questions Date: Mon, 7 May 2012 08:39:29 -0700 Message-ID: <521E98A2FB7F430A809562D3A84E5F41@us.oracle.com> References: <871umzrvfw.fsf@gmail.com> <87y5p64o3v.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1336405198 32096 80.91.229.3 (7 May 2012 15:39:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 7 May 2012 15:39:58 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'Stefan Monnier'" , "'Thierry Volpiatto'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 07 17:39:56 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 1SRQ2Q-0004fT-Fb for ged-emacs-devel@m.gmane.org; Mon, 07 May 2012 17:39:50 +0200 Original-Received: from localhost ([::1]:34967 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRQ2P-0000Ca-MX for ged-emacs-devel@m.gmane.org; Mon, 07 May 2012 11:39:49 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRQ2J-0000CN-Rf for emacs-devel@gnu.org; Mon, 07 May 2012 11:39:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SRQ2D-000864-GE for emacs-devel@gnu.org; Mon, 07 May 2012 11:39:43 -0400 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:16956) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRQ2D-00085V-9p for emacs-devel@gnu.org; Mon, 07 May 2012 11:39:37 -0400 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q47FdW1T003437 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 7 May 2012 15:39:33 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q47FdVle029073 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 7 May 2012 15:39:31 GMT Original-Received: from abhmt115.oracle.com (abhmt115.oracle.com [141.146.116.67]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q47FdUmg019019; Mon, 7 May 2012 10:39:30 -0500 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 07 May 2012 08:39:30 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Thread-Index: Ac0sZOjvH3Zl5LscSY2NCEktsq4yUQAAG/tA X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 141.146.126.227 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:150355 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 ;-) Agreed. Not "just because". But similarly, just because Emacs Lisp is not Common Lisp does not mean that it should always do things differently. ;-) IOW, I think (hope) we agree that there should be good, preferably Emacs-specific reasons why we choose to do things differently (or even the same). But when other things are equal (which they seldom but sometimes are), it can help users who are familiar with Common Lisp if we do things similarly. CL is perhaps the closest well-known Lisp to Emacs Lisp in both design and aims. And there are usually good reasons why CL defines & handles things the way it does. That can serve as a starting point for whatever you decide for Elisp. IOW, what CL does is always worth looking at, before deciding how to roll your own. > 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...). +1 (but one could give a similar parenthetical remark about `defadvice') > 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 Sounds good. > (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). Any reason for that as far as you can tell, apart from hysterical raisins?