[Top][All Lists]

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

But then what are namespaces ? (was: A read-based grep-like for symbols

From: João Távora
Subject: 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, 2 Oct 2021 16:33:06 +0100

On Sat, Oct 2, 2021 at 4:22 PM Stefan Kangas <stefan@marxist.se> wrote:

> This might be a tangent,

Yup, but a good question. Changing the subject again.

> but can we really say that shorthands
> implements namespaces?  AFAIU, namespaces means that you restrict the
> scope of identifiers (or symbols) so that identically named
> identifiers in different scopes don't conflict.  But shorthands does
> not do that, and would therefore be better described precisely as a
> work-around for the lack of namespaces.  Or am I missing something?

There is no canonical definition, as far as I know.

For me "namespaces" are about allowing the same thing to be invoked
by different names, depending on context.  Take names, names of humans.
There is your family namespace, the official state namespace, your
gamer/hacker/hobbyist namespace, your high-school nickname namespace.
Depending on context, you are known by different names there but you are
always you.  Your name is a good example. "Stefan" in the context of
this thread,
means you. In emacs-devel it's not enough, we need your surname.

This is the invariant I find in programming language namespaces, of my
brief investigation.  The Emacs wiki page on namespaces has good humour
about this at the top.


reply via email to

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