guile-devel
[Top][All Lists]
Advanced

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

Recursive namespace


From: NIIBE Yutaka
Subject: Recursive namespace
Date: Tue, 24 Apr 2001 12:50:12 +0900 (JST)

Keisuke Nishida wrote:
 > Hmm, the idea of "recursive namespace" is one thing that I am
 > thinking of implementing in the module system for my VM.

It is not good to confuse/(or mix intentionally) the name space of
module and the name space of symbol.  Even if you introduced '::' for
module syntax, you would be certainly possible to have separate
differenet name spaces.

 > Now, what happens if you evaluate the following?
 > 
 >   List    => ???
 > 
 > My personal favorite would be that it returns the module named "List".

It is THE PITFALL.  It is quite weird for me, because it is _direct_
contradiction for _YOUR_ purpose (of compiler).  I have to say, this
is bad design for compiler.  It introduce nasty things.  If we'd
implement the idea above correctly, it may result: Module can be
determined at run-time dynamically.  Say,

        (let ((module (procedure-which-determine-module)))
           (module::func blah blah blah))

See?  I don't think it is good idea.  Module should be determined at
comile time.  Please think again.  There is no need to use module at
run time dynamically.  There is no reason to mix the symbol space and
module space.  The confusion introduce nasty things.

I don't think the specification of module such like: 

        (oops goops gtklos)

or syntax you're using:

        OOP::GOOPS::make

is not good.

My points are two: 
        Don't use symbol space to implement module space. 
        Module should be determined at compile time.
-- 



reply via email to

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