From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.devel Subject: Re: But then what are namespaces ? Date: Sat, 02 Oct 2021 20:41:28 +0000 Message-ID: <6969a83a74f286a96423@heytings.org> References: <87a6jt7ilx.fsf@web.de> <87fstlzlaq.fsf@gmail.com> <20211001070242.GC16352@tuxteam.de> <1dd5e2c1f42bce50dc26@heytings.org> <6969a83a74f7bebe69f2@heytings.org> <6969a83a74b57d3d7839@heytings.org> <6969a83a7447c1963410@heytings.org> <6969a83a74ab69ebd555@heytings.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38370"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, tomas@tuxteam.de, Stefan Kangas , =?UTF-8?Q?Jo=C3=A3o_T=C3=A1vora?= , Dmitry Gutov To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 02 22:43:07 2021 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 1mWlqd-0009nC-6A for ged-emacs-devel@m.gmane-mx.org; Sat, 02 Oct 2021 22:43:07 +0200 Original-Received: from localhost ([::1]:34000 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWlqV-0004Q7-KG for ged-emacs-devel@m.gmane-mx.org; Sat, 02 Oct 2021 16:42:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWlp8-00033D-26 for emacs-devel@gnu.org; Sat, 02 Oct 2021 16:41:34 -0400 Original-Received: from heytings.org ([95.142.160.155]:34090) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWlp4-00037p-Q6 for emacs-devel@gnu.org; Sat, 02 Oct 2021 16:41:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1633207288; bh=9tVb2BgA10qwrpHOPIqXfoA3vDdiqp/lp/vZHw4t3I8=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=i91o+fWAYN14cspcAjVMO0CP6MufynVB01UhVJu+bez+7PJl+YcU/H5ud8qpIOmh9 XFQ4DYc/CkCHEbO7TlWd/BlFzRXcTOG+v0D1VtP1dImzwDTou0W+8iu/uDwRW0TQR5 SGt/kMZF3xAs7xReALa1BfNKDqY/gKE+Faguupc9WaRNEz9Xehmzs6dOGXUGqQlmeI mYUTYNO6RJbcqA4/aixSSgJSdUxhIe6f1ILjQ251awy/6z3gr0laneg6rPW/YcnHbF 8Q90FoeZjsk4Q/FQlIZX1sHyPUGie5NXXPWljAZmBadmIneKSP7/9OGGh+xA/+AmQt yJsoT+hU3QJig== In-Reply-To: Received-SPF: pass client-ip=95.142.160.155; envelope-from=gregory@heytings.org; helo=heytings.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-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.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:276079 Archived-At: >> Elisp has a single namespace, and this does not change with shorthands. > > Many/most languages with namespaces map "local names" to a unique global > namespace (e.g using hierarchies like `org.gnu.foo.bar` to avoid > conflicts). > Yes, perhaps what I said wasn't clear enough: all languages have a single global namespace, and languages with namespaces have a single global namespace that is partitioned. (I'm not sure what you mean by "many/most", I at least don't know languages with namespaces that use a different strategy.) > > So this new mechanism is not that different. > It depends how you define "different" ;-) It is not entirely different indeed, from a user viewpoint it provides a similar feature, but it is different: in languages with namespaces, identifiers are bound in a certain subset of the global namespace, whereas this mechanism only allows you to locally expand an identifier prefix to another identifier prefix. It's more a preprocessor-like workaround, a poor man's implementation of namespaces if you want.