From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matt Armstrong Newsgroups: gmane.emacs.devel Subject: Re: Help sought understanding shorthands wrt modules/packages Date: Tue, 08 Nov 2022 22:02:08 -0800 Message-ID: <877d04mzrz.fsf@rfc20.org> References: <87r0yemgt2.fsf@rfc20.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39777"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 09 07:03:29 2022 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 1oseBM-000ABM-3v for ged-emacs-devel@m.gmane-mx.org; Wed, 09 Nov 2022 07:03:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oseAQ-0006FO-8D; Wed, 09 Nov 2022 01:02:30 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oseAD-0006E7-RV for emacs-devel@gnu.org; Wed, 09 Nov 2022 01:02:21 -0500 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oseAC-0005hh-8P; Wed, 09 Nov 2022 01:02:17 -0500 Original-Received: (Authenticated sender: matt@rfc20.org) by mail.gandi.net (Postfix) with ESMTPSA id 361F11BF204; Wed, 9 Nov 2022 06:02:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rfc20.org; s=gm1; t=1667973731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OO7EYhXbcXgHdu7D39pB7lILQQFhSAT5Q2fQCGzzyOw=; b=nyKFfVsiOILQKiE+q2wJIDVLWOrrbFIPpsIywKcRiq8J/3ZBbF2lNPSp0FPPitOJ5/cRQu QLLxN8kjGtT7l17uBFOdwim+SwOlT1Iidh0awIOEIperfnQ6gKjP6luQWmoi9ARtmLdo7O YUulWjB1rfgsW+jUyM4/B3hOyRQo1nHX8dCeol8pfnMuQY04uTIeoYOVszjzCosp/mBCFZ zdIv4oVLVBQwtKmMv1tMfNZ+hmup76lxQ3+rR+BcaLbDnHvX5iQ/NVWoeQUOZztWyDlt5K uhr6QevNd5EeSF/t7NEpXb7COkj++X9ugrS8wzYb4CcE5n89xqPcL7BO385n0w== Original-Received: from matt by naz with local (Exim 4.96) (envelope-from ) id 1oseA4-001g4e-2L; Tue, 08 Nov 2022 22:02:08 -0800 In-Reply-To: Received-SPF: pass client-ip=217.70.183.201; envelope-from=matt@rfc20.org; helo=relay8-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:299382 Archived-At: Richard Stallman writes: > I implemented CL packages 40 years ago -- I don't remember the details. > > There was a feature that let you specify, in one package FOO, "Let me > omit package prefixes when I refer to symbols from package BAR." > Then if BAR defines a symbol BAR:HACK, and you write HACK in package FOO > with no prefix, the package system would search for a symbol HACK, find > it in package BAR, and treat HACK as an alias for BAR:HACK. > > Is that what :USE does? If so, it would seem that :USE is the bad design > I am talking about. [...] (I have clipped the, I believe, well understood downsides of :use) > This is a gross bug. We should not implement such a bug. No one ever > should. > > We can make package systems that behave naturally and consistently. > But they can't be compatible with CL packages. How about this goal: Any package system adopted by Emacs should allow new symbols to be exported from a package without risk of breaking its users. I wonder if a consensus could be reached here. Namely, just omit :use from any Emacs implementation of lisp packages. I would like to hear more from people with more Common Lisp experience than I do, but importing all symbols from one package into another does not strike me as an essential feature, or a good idea in general. It is popular in some languages, even idiomatic. Others, such as Go, make it impossible to achieve for reasons similar to the ones Richard outlined. Namely, eventually, heavily used packages cannot add anything new for fear of breaking something.