[Prev][Next][Index][Thread]
multi-level namespaces?
-
To: info-dylan@ai.mit.edu
-
Subject: multi-level namespaces?
-
From: Bruce Hoult <bruce@hoult.org>
-
Date: Tue, 20 Mar 2001 04:30:02 -0500 (EST)
-
Mail-Copies-To: nobody
-
Organization: ihug ( New Zealand )
-
User-Agent: MT-NewsWatcher/3.0 (PPC)
-
Xref: traf.lcs.mit.edu comp.lang.dylan:13136
I'm wondering if anyone can explain the reasons for the two-level
library/module affair in Dylan.
I understand the protection and rganizational reasons for having two
levels not one and think that it woks pretty well, but I'm wondering why
there aren't *more* levels.
One of the few things that I find I like about Java is that it has a
reasonable solution for making library names globally unique. If I call
my favourite sorting library "org.hoult.Sorting" then I *know* that it's
not going to collide with anyone else's sort library [1].
It seems to me that something similar would be useful for Dylan.
The question is, should this be enshrined in the language syntax with
additional layers of library nesting (and possibly runtime introspection
of the structure of libraries), or would it be better handled by a mere
lexical convention of people simply happening to name their libraries
that way?
e.g.
define library org.hoult.Sorting
use dylan;
end library;
etc
-- Bruce
[1] assuming they follow the rules, that is. But that's true of all
programming language protection mechanisms -- they're to prevent
accident, not terrorism.
Follow-Ups: