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: Real-life examples of lexical binding in Emacs Lisp Date: Fri, 29 May 2015 17:21:20 +0100 Message-ID: <87iobb5p8f.fsf@newcastle.ac.uk> References: <55684990.80108@easy-emacs.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1432916502 2741 80.91.229.3 (29 May 2015 16:21:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 May 2015 16:21:42 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Andreas =?utf-8?Q?R=C3=B6hler?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 29 18:21:41 2015 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 1YyN2T-0004B6-4u for geh-help-gnu-emacs@m.gmane.org; Fri, 29 May 2015 18:21:41 +0200 Original-Received: from localhost ([::1]:36975 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyN2S-00040U-KV for geh-help-gnu-emacs@m.gmane.org; Fri, 29 May 2015 12:21:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyN2I-00040O-0a for help-gnu-emacs@gnu.org; Fri, 29 May 2015 12:21:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyN2C-0005ph-UX for help-gnu-emacs@gnu.org; Fri, 29 May 2015 12:21:29 -0400 Original-Received: from cheviot22.ncl.ac.uk ([128.240.234.22]:56653) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyN2C-0005pW-OU for help-gnu-emacs@gnu.org; Fri, 29 May 2015 12:21:24 -0400 Original-Received: from smtpauth-vm.ncl.ac.uk ([10.8.233.129] helo=smtpauth.ncl.ac.uk) by cheviot22.ncl.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1YyN29-00042L-E3; Fri, 29 May 2015 17:21:21 +0100 Original-Received: from jangai.ncl.ac.uk ([10.66.67.223] helo=localhost) by smtpauth.ncl.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1YyN29-0001GZ-5j; Fri, 29 May 2015 17:21:21 +0100 In-Reply-To: <55684990.80108@easy-emacs.de> ("Andreas \=\?utf-8\?Q\?R\=C3\=B6hle\?\= \=\?utf-8\?Q\?r\=22's\?\= message of "Fri, 29 May 2015 13:12:16 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.0.0.0 (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:104667 Archived-At: Andreas R=C3=B6hler writes: > Am 29.05.2015 um 11:30 schrieb Joost Kremers: >> Marcin Borkowski wrote: >>> (Examples of general-purpose programming problems >>> made easier with l.b. are more or less obvious/easy to find, but Emacs >>> is a text editor, after all, and this is its primary area.) >> Yes, Emacs is a text editor, but I'd say the primary purpose of Elisp is >> to *implement* that editor. The fact that Elisp has more facilities for >> editing text than most other programming languages is just a consequence >> of that. >> >> So presumably lexical binding was added to Elisp not so much because it >> makes text editing easier, but because it makes implementing the text >> editor easier. >> >> > > Would be great to see an example where implementing the text editor is ea= sier > that way. dash-functional.el makes extensive use of lexical binding and would not work without it. I've used it in my m-buffer package, in a small way. I could have done without. And, yes, it's mostly about closures (from the programmers POV). But asking for examples of where it makes editing easier seems to not make sense to me. Can you show me a real *text editing* problem that quick-sort solves, like something that is easier done than with bubble sort? Phil