From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Proper namespaces in Elisp Date: Fri, 08 May 2020 17:32:15 -0700 Message-ID: References: <87ftcee7td.fsf@tromey.com> <87pnbgzdmx.fsf@tromey.com> <1225997b-648a-068d-7f6b-e1575477a0d0@dancol.org> <875zd62qy7.fsf@t510.orion.oneofus.la> <09ed390e-c735-3a7e-ecfd-504557b192a2@dancol.org> <87368a2d1a.fsf@t510.orion.oneofus.la> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8" Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="9557"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: AquaMail/1.24.0-1585 (build: 102400006) Cc: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= , Tom Tromey , Stefan Monnier , emacs-devel@gnu.org To: Vladimir Sedach Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 09 02:34:41 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jXDRw-0002OF-Sx for ged-emacs-devel@m.gmane-mx.org; Sat, 09 May 2020 02:34:40 +0200 Original-Received: from localhost ([::1]:42034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXDRv-0000em-Ob for ged-emacs-devel@m.gmane-mx.org; Fri, 08 May 2020 20:34:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXDPm-0007iV-Fu for emacs-devel@gnu.org; Fri, 08 May 2020 20:32:26 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:42622) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXDPk-0001GC-NI for emacs-devel@gnu.org; Fri, 08 May 2020 20:32:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:References:In-Reply-To:Date:CC:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=5Z7AU/XDycB0SuHFu9uSAoN1HdL+VQY7uPGYFb839xs=; b=kzeWHyMUjcdiGTtpGICfiv71I6 S1b1/+5iDFR8hWpwskuWnT3cdEtZcGTLlKm96T8t9oH53nOpw15gtN7poJ7QYgOld8DBND+XRlbjV WFj/2cFEjPhtdSDfeR48xVidEpgiIJG7U2IhdzmxJw6RHTN+7sKaM97t9OahmcO+r8+f7+6xQNAlU 5yJdn6s507iEwj08tNIfmSdbuk+gRDskp0MdeTb/puXntRfwpayKUDvNJg83zVfR1k6Lp0rvBHW1n HS2kphZnG58whuIpfi7Fs5aUaFZB/lbt4aHReOn7GO5LzNZVSNGNP2msDywpKzNgOv40py8Wrt+z4 h4Ji9rWg==; Original-Received: from [172.58.43.37] (helo=[33.189.252.15]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1jXDPd-0000nm-T2; Fri, 08 May 2020 17:32:18 -0700 In-Reply-To: <87368a2d1a.fsf@t510.orion.oneofus.la> Received-SPF: pass client-ip=2600:3c01::f03c:91ff:fedf:adf3; envelope-from=dancol@dancol.org; helo=dancol.org X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:249343 Archived-At: On May 8, 2020 5:13:00 PM Vladimir Sedach wrote: > Daniel Colascione writes: >> I wouldn't call package-local nicknames "throw[ing] away" the >> namespace system. The post describes a logical extension. Is your >> argument that the CL namespace system (suitably extended) *allows* >> people to do silly things (like :use) even though it doesn't require >> that they do? > > Yes, it is silly, and people do it. They will do it in Elisp if you > let them. I think unintended re-definition of short names due to > "namespace multiple inheritance" is going to be a problem for Elisp, > because ordinary Emacs users load code from MELPA. It is a lot > different than encountering the problem in C++ or something when you > are a distribution maintainer compiling binaries. Neither the R6RS > approach of throwing an error, nor clobbering the definition and > showing a warning (what some Common Lisp implementations do) that > will not be paid attention to is appropriate for what should be a > backwards-compatible package update. So there are three basic operations we can support: in Python syntax, 1) from PKG import * (exposing PKG.foo as foo), 2) import PKG as p (exposing PKG.foo as p.foo) and 3), from PKG import foo (exposing PKG.foo as foo). CL supports all three. I'm most interested in supporting #2, since that's closest to existing use. The lexspace prototype posted earlier today supports #3 and #1 (the latter via lexspace inheritance) only, but I think we should do #2 instead, and I think we can do it without runtime overhead.