From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@newcastle.ac.uk (Phillip Lord) Newsgroups: gmane.emacs.help Subject: Re: DynamicBindingVsLexicalBinding Date: Mon, 14 Oct 2013 12:21:05 +0100 Message-ID: <87txgk85em.fsf@zerg32.ncl.ac.uk> References: <52598D4A.2010901@easy-emacs.de> <871u3qjq0j.fsf@yandex.ru> <525A51BD.5040903@easy-emacs.de> <525AA42B.6030006@gmx.net> <6d5df021-be1e-40a2-966a-548a7ee9deb3@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1381749688 6101 80.91.229.3 (14 Oct 2013 11:21:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Oct 2013 11:21:28 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, Kai =?utf-8?Q?Gro=C3=9Fjohann?= To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 14 13:21:29 2013 Return-path: Envelope-to: geh-help-gnu-emacs@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 1VVgDJ-0007LV-3a for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Oct 2013 13:21:29 +0200 Original-Received: from localhost ([::1]:36268 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVgDI-00071j-9X for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Oct 2013 07:21:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50333) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVgD4-00071b-IV for help-gnu-emacs@gnu.org; Mon, 14 Oct 2013 07:21:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VVgCy-0002AP-4k for help-gnu-emacs@gnu.org; Mon, 14 Oct 2013 07:21:14 -0400 Original-Received: from cheviot22.ncl.ac.uk ([128.240.234.22]:59053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVgCx-0002AH-Um for help-gnu-emacs@gnu.org; Mon, 14 Oct 2013 07:21:08 -0400 Original-Received: from smtpauth-vm.ncl.ac.uk ([10.8.233.129]) by cheviot22.ncl.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1VVgCw-000736-DI; Mon, 14 Oct 2013 12:21:06 +0100 Original-Received: from localhost (zerg32.ncl.ac.uk [10.66.65.18]) (authenticated bits=0) by smtpauth-vm.ncl.ac.uk (8.13.8/8.13.8) with ESMTP id r9EBL5vw023648 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 14 Oct 2013 12:21:05 +0100 In-Reply-To: <6d5df021-be1e-40a2-966a-548a7ee9deb3@default> (Drew Adams's message of "Sun, 13 Oct 2013 09:21:33 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 128.240.234.22 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:94009 Archived-At: Drew Adams writes: >> with dynamic binding you can do other cool things (you can let-bind >> a variable, then call a function which calls...and the innermost >> function will reference the value you just bound -- so you can pass >> parameters around without actually having to mention them on every >> function call). > > Yes. Which is especially important for a heavily interactive and > customizable program such as Emacs. Emacs users extend and otherwise > modify or adapt the source code, and they do so sometimes on the fly > and interactively. I don't think this is an advantage of dynamic binding; it's just an advantage of having lots of configuration options. I've certainly used the feature that Kai likes, but mostly it has been to hack around code which I do not control or do not want to change. Nowadays, in general, I would want to advice code instead. >> So each of the styles has their own advantage. > > Definitely. Those who imagine that a lexical-only approach, a la > Scheme, would be a better way to go for Emacs are on the wrong track, > IMHO. I am not convinced that having two complete separate models of variable binding is a great idea. This forces Emacs programmers to have a good understanding of dynamic and lexical scope. If Emacs is to move more toward lexical scope, then supporting both should be considered only to be a stepping stone. > Now if only Emacs Lisp had good namespace control, like Common-Lisp > packages... A good point, but an independent one I think!