From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David De La Harpe Golden Newsgroups: gmane.emacs.devel Subject: Re: is requiring cl bad? Date: Thu, 20 Dec 2012 04:46:41 +0000 Message-ID: <50D29831.9060408@harpegolden.net> References: <874njm2vlx.fsf@kanis.fr> <87txrkfqcl.fsf@kuiper.lan.informatimago.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1355978815 19587 80.91.229.3 (20 Dec 2012 04:46:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Dec 2012 04:46:55 +0000 (UTC) To: Emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 20 05:47:09 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 1TlY2H-00011Y-MS for ged-emacs-devel@m.gmane.org; Thu, 20 Dec 2012 05:47:09 +0100 Original-Received: from localhost ([::1]:55381 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlY23-0006or-TN for ged-emacs-devel@m.gmane.org; Wed, 19 Dec 2012 23:46:55 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:37203) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlY1z-0006oZ-Qs for Emacs-devel@gnu.org; Wed, 19 Dec 2012 23:46:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TlY1y-0004xj-CK for Emacs-devel@gnu.org; Wed, 19 Dec 2012 23:46:51 -0500 Original-Received: from harpegolden.net ([65.99.215.13]:36132) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlY1y-0004xZ-63 for Emacs-devel@gnu.org; Wed, 19 Dec 2012 23:46:50 -0500 Original-Received: from [87.198.47.211] (87-198-47-211.ptr.magnet.ie [87.198.47.211]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client CN "David De La Harpe Golden", Issuer "David De La Harpe Golden Personal CA rev 3" (verified OK)) by harpegolden.net (Postfix) with ESMTPSA id 3678E683D5 for ; Thu, 20 Dec 2012 04:46:48 +0000 (GMT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20121122 Icedove/10.0.11 In-Reply-To: <87txrkfqcl.fsf@kuiper.lan.informatimago.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 65.99.215.13 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:155676 Archived-At: On 17/12/12 19:09, Pascal J. Bourguignon wrote: >> 24.3 finally provides an alternative: `cl-lib' which offers the >> same functionality but in a namespace-clean way (i.e. using a "cl-" >> prefix everywhere). > > This is a silly solution. > The right solution is to implement a package system. > The consistent-prefix approach may be a C-like solution, but is still noticeably better than the previous conflicty mess, and widely used for other emacs lisp libs. But regarding the idea of "a package system" in particular, as you may mean a system similar to common lisp "packages": If emacs ever did go toward adding new facilities in the general area of modularity (however unlikely it is in reality in the near future), I reckon Ron Garret's common lisp land "lexicons" work [1] might be a better "lispy modularity thingy" for emacs lisp to be inspired by than common lisp packages in particular. At least, I'd take a hard look at lexicons (and at least glance at what some other languages do), before just blindly adding common lisp style packages. Emacs lisp is lexically scoped now after all. To people coming from quite a few other languages with more [nowadays-]conventional module systems, lexicons might well seem less weird than packages. In emacs lisp land there is obviously no prior usage of common lisp style packages in the first place (yes I am vaguely aware you can feck about with non-default obarrays in emacs lisp for some purposes, but meh), unlike the situation in common lisp land where inertia and compat concerns will probably keep most people on packages anyway despite the existence of lexicons there now. [1] http://www.flownet.com/ron/lisp/lexicons.pdf """ Lexicons are first-class global lexical environments, what are sometimes called "modules" or "namespaces" in other languages. [...] instead of mapping strings to symbols, lexicons map symbols to (global) bindings. """