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

Re: A basic question: defining modules and libraries



In article <87u2hxct70.fsf@ethereal.dyndns.org>, Nolan Darilek
<nolan@ethereal.dhis.org> wrote:

> In an attempt to delve deeper into Dylan, I began studying the output
> of make-dylan-app. Here is a sample from myapp-exports.dylan:
> 
> module: dylan-user
> 
> define library myapp
>   use dylan;
>   use format-out;
>   //use streams;
>   //use standard-io;
>   //use format;
> end library;
> 
> define module myapp
>   use dylan;
>   use extensions;
>   use format-out;
>   //use streams;
>   //use standard-io;
>   //use format;
> end module;
> 
> I think I understand the relationship between libraries and modules,
> but why is 'use dylan;' specified in both sections? I'm trying to
> grasp the significance of the various 'use' statements, and why some
> are placed within the library sections and others are placed alongside
> the module definition.

To be honest this has always bothered me.

Why are there exactly *two* levels of nesting of namespaces?  Why not
either one, or else an arbitrary number?

"one" seems like a pretty good answer to me, given the obvious prevelence
of libraries only containing one module with the same anme as the library
-- and in some cases (format-out) containing only a single function in
that module.

-- Bruce