[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: But then what are namespaces ?

From: Gregory Heytings
Subject: Re: But then what are namespaces ?
Date: Sat, 02 Oct 2021 20:41:28 +0000

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]