l4-hurd
[Top][All Lists]
Advanced

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

Name spaces in programming languages


From: Ludovic Courtès
Subject: Name spaces in programming languages
Date: Thu, 27 Oct 2005 18:29:26 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

"Alfred M\. Szmidt" <address@hidden> writes:

> If and only if one considers globally shared mutable namespaces
> broken.  People with a lispish background don't.

They do: most Lisp derivatives and Scheme implementations have
state-of-the-art module systems that provide many ways to avoid name
clashes for instance (you probably know the one of Guile).

Jonathan might add that Lisp-like languages are (close to?) capability
systems.  Since all objects, including procedures, are first-class, you
rarely need to rely on a global namespace: you can simply pass around
objects.  In fact, programs should rarely use top-level bindings: these
are mostly used when interacting with a user via the REPL for instance.

In Guile, it is possible to create "confined" modules that can only see
the bindings imposed by R5RS, using `#:pure' [0].

Thanks,
Ludovic.

[0] 
http://www.gnu.org/software/guile/docs/guile-ref/Creating-Guile-Modules.html#Creating%20Guile%20Modules




reply via email to

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