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 ? (was: A read-based grep-like for symbols (el-search?) (was Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master))) Date: Sat, 02 Oct 2021 19:42:15 +0000 Message-ID: <6969a83a74ab69ebd555@heytings.org> References: <87fstl7lzw.fsf@web.de> <87a6jt7ilx.fsf@web.de> <87fstlzlaq.fsf@gmail.com> <20211001070242.GC16352@tuxteam.de> <1dd5e2c1f42bce50dc26@heytings.org> <6969a83a74f7bebe69f2@heytings.org> <6969a83a74b57d3d7839@heytings.org> <6969a83a7447c1963410@heytings.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="l9ZadthQ9c" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5165"; mail-complaints-to="usenet@ciao.gmane.io" Cc: tomas@tuxteam.de, Stefan Kangas , Dmitry Gutov , emacs-devel@gnu.org To: =?UTF-8?Q?Jo=C3=A3o_T=C3=A1vora?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 02 21:42:59 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 1mWkuQ-00017c-7d for ged-emacs-devel@m.gmane-mx.org; Sat, 02 Oct 2021 21:42:58 +0200 Original-Received: from localhost ([::1]:34578 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWkuN-0006v4-Ob for ged-emacs-devel@m.gmane-mx.org; Sat, 02 Oct 2021 15:42:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWkto-0006GU-6y for emacs-devel@gnu.org; Sat, 02 Oct 2021 15:42:20 -0400 Original-Received: from heytings.org ([95.142.160.155]:34002) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWktm-0006zB-17 for emacs-devel@gnu.org; Sat, 02 Oct 2021 15:42:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1633203735; bh=hOBzK4+bBVmLSBsVEXwsKVrqKYuBdPjv6/7VXydTpqs=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=rL5DdfDyZoMGtYDLwZAt1hT0FX/E9Kgd6RD11U+yMNWvJNKtd40RsATzCJHDGHh1j u5KALrdt2t4O7bbKoQ6uFH6Lba/Ef/UCIwso48MjdyED6Z4GERfJqIY1IAM6ji6G/U svcH4OJN2Jg1DglDc8JiSyWeFYQUHNaiCzKYD8slJWJDKGiO0iStM50V9vlQF2aHp/ x8DgrRTUOiaXyW1A2U13GbKodozJBsH90sHVSRiM2nS19Roe2mSxdPcp/4ht7aLmJv Uq5xYN7vha/u2wRctak+s0xcJNEECdIoahddtGr+IFn9xglKNSDgFrjy9JBV/h/nO0 X3sisXo9G0/uA== In-Reply-To: Content-ID: <6969a83a74c30a817b01@heytings.org> 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:276075 Archived-At: --l9ZadthQ9c Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-ID: <6969a83a743d113d0c77@heytings.org> Stefan K: > > can we really say that shorthands implements namespaces? AFAIU,=20 > namespaces means that you restrict the scope of identifiers (or symbols)= =20 > so that identically named identifiers in different scopes don't=20 > conflict. But shorthands does not do that, and would therefore be=20 > better described precisely as a work-around for the lack of namespaces. > Indeed. Namespaces partition the set of identifiers in such a way that=20 the same identifier can be bound in different places to different=20 meanings, and that you can refer to each of the different meanings of an=20 identifier either by using their namespace prefix(es), or by importing one= =20 of the meanings of an identifier ("using" in C++, "import" in Java). Elisp has a single namespace, and this does not change with shorthands.=20 So indeed, as you write, shorthands are better characterized as a=20 workaround for the lack of namespaces. Nonetheless, they provide one of=20 the features of namespaces, namely that you can import subsets of the=20 possible identifiers of the single namespace and access them through a=20 shorter name. Jo=C3=A3o: > > For me "namespaces" are about allowing the same thing to be invoked by=20 > different names, depending on context. > This is not at all what namespaces are about. This is aliasing. --l9ZadthQ9c--