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

multi-level namespaces?



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: