From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: Proper namespaces in Elisp Date: Sat, 09 May 2020 17:25:12 +0000 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 Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="42082"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: Tom Tromey , emacs-devel@gnu.org, =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , Stefan Monnier To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 09 19:25:49 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 1jXTER-000AoN-P7 for ged-emacs-devel@m.gmane-mx.org; Sat, 09 May 2020 19:25:47 +0200 Original-Received: from localhost ([::1]:38442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXTEQ-00014q-8P for ged-emacs-devel@m.gmane-mx.org; Sat, 09 May 2020 13:25:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXTDx-0000ID-Gb for emacs-devel@gnu.org; Sat, 09 May 2020 13:25:17 -0400 Original-Received: from mx.sdf.org ([205.166.94.20]:50155) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXTDv-0004Jp-7j for emacs-devel@gnu.org; Sat, 09 May 2020 13:25:16 -0400 Original-Received: from sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 049HPCGd027607 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Sat, 9 May 2020 17:25:12 GMT Original-Received: (from akrl@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 049HPCcg029968; Sat, 9 May 2020 17:25:12 GMT In-Reply-To: (Daniel Colascione's message of "Sat, 09 May 2020 09:11:39 -0700") Received-SPF: pass client-ip=205.166.94.20; envelope-from=akrl@sdf.org; helo=mx.sdf.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/09 11:50:32 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, 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:249515 Archived-At: Daniel Colascione writes: > On May 9, 2020 1:37:16 AM Andrea Corallo wrote: > >> Daniel Colascione writes: >> >>> 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 >> >> I suspect we'll need all threes anyway. > > Why? What problem is actually being solved by #1 and #3? If the > problem is that package names long enough to avoid collisions are too > annoying to type, we can address this problem with #2. I think #1 would be the way to derive an entire package and add some functionality to it without changing the names that you'll finally want to re-expose. Is this correct? -- akrl@sdf.org