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, 22 Nov 2022 16:55:18 -0800 Message-ID: <87y1s2a3rd.fsf@rfc20.org> References: <651bbe21-f179-730a-4f10-7dc6d27055ea@gmail.com> <878rk2c1he.fsf@rfc20.org> <831qpu25hx.fsf@gnu.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="19299"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rms@gnu.org, gerd.moellmann@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 23 01:56:15 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 1oxe3j-0004ng-GE for ged-emacs-devel@m.gmane-mx.org; Wed, 23 Nov 2022 01:56:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxe31-00062K-3E; Tue, 22 Nov 2022 19:55:31 -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 1oxe2z-00060i-EQ for emacs-devel@gnu.org; Tue, 22 Nov 2022 19:55:29 -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 1oxe2w-0005U6-Pm; Tue, 22 Nov 2022 19:55:29 -0500 Original-Received: (Authenticated sender: matt@rfc20.org) by mail.gandi.net (Postfix) with ESMTPSA id CB4681BF206; Wed, 23 Nov 2022 00:55:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rfc20.org; s=gm1; t=1669164922; 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=dd4fdJYNtPrRV9eItNq9SPin5xi4Q17Ju31Ce6ILAE0=; b=JUtYQrODKzj/SACYudQmdyWFXNyqewRO7neBTw4N8fezjUUlwr4PmRdZJu+YokCmD3+kTp MhWh2rqyyPvuqq8q7ZTHb0g3sIyAUsuV7eCNVuaFDCxdsT6EQqAOZPVE1chDqdYeiZkrwJ 0Zj2RFJj4MvtchwjpqAUezihZJ8RHkQczXw3UR/ww3kW4HiXuQbjZ6P6OAwow2CI06+Ydf JXXEwJQDIJJhVtlFoNgJXV1WvFunG8uAfi+O5D0u5MM6APA0/s2ZuwvvCiGyRtLFTuPVUg fgkwZtxxeMOVIZbZtxG+LmKNso3zrOSNSUSDXHI3XcWy+QRJFwssrv649fENvQ== Original-Received: by mac-mini.lan (Postfix) with ESMTPS id 833D83A9B3; Tue, 22 Nov 2022 16:55:18 -0800 (PST) Original-Received: by naz.lan (Postfix, from userid 1000) id 61D0843C089E; Tue, 22 Nov 2022 16:55:18 -0800 (PST) In-Reply-To: <831qpu25hx.fsf@gnu.org> 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, T_FILL_THIS_FORM_SHORT=0.01 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:300366 Archived-At: Eli Zaretskii writes: >> From: Matt Armstrong >> Cc: emacs-devel@gnu.org >> Date: Tue, 22 Nov 2022 10:01:33 -0800 >> >> I think there is another drawback of Emacs' prefix based namespace >> convention: that of longer local (private, non-public, unexported, etc.) >> names. > > Why is that a drawback? (It's a serious question.) Thanks for asking. I have to admit that my answer boils down to familiarity. I'd like programming in Emacs Lisp to feel more like the other programming languages I'm more familiar with. When I have written Emacs Lisp packages the package name prefixes have been a bit of a chore to deal with. I'm happier programming in languages where the namespace context is a property of a scope, usually a file level context. This way, the "current" namespace need not be re-stated throughout a package's code every time a name is mentioned. This is a different concern than how code references names names from other packages. If I'm writing code that uses something from some other package, I'm fine stating that other package's name, especially if the language lets me abbreviate longer package names (usually for the local file/scope). I believe the general dislike for having to re-state the associated package within the package code itself is one reason why people write packages like https://elpa.gnu.org/packages/nameless.html. My guess is that avoiding this kind of repetitive verbosity, at least for the common cases, is what many people want to get out of "Emacs Packages/Modules". That is just a guess, though. I can't really tell what benefits people actually want when they "it'd be great if Emacs had CL style packages." I have to say that, personally, CL style packages didn't "cut it" for me either. They did make it easier to have package-private names that were boilerplate free, but they didn't make it obvious which of my symbols were exported and which weren't. That was a property of not of the symbol name, not of its `defun/defvar', but of whether it appeared in some export list somewhere else, often in a different file. I didn't think that was particularly great, either.