On Sun, Oct 22, 2006 at 11:38:10PM +0200, Leopold Toetsch wrote:
> Am Sonntag, 22. Oktober 2006 20:56 schrieb Patrick R. Michaud:
> 
> > I strongly disagree.  I don't think that a subclass should have to
> > be named as a sub-namespace of its parent class.
> 
> Namespace and classes are currently totally orthogonal. You are declaring a 
> subclass (not a sub-namespace) with all the implications for naming it.

Okay, I'll rephrase to avoid the classname/namespace confusion(*):

I don't think that a subclass' name should have to include the
names of its parent classes.  From your earlier message:

On Sat, Oct 21, 2006 at 07:10:21PM +0200, Leopold Toetsch wrote:
> IMHO this should look like this:
>
>   .HLL 'pge', ''
>   ...
>   cl = newclass 'Exp'     # ['pge'; 'Exp']
>   ...
>   .namespace ['Exp']      # ['pge'; 'Exp']
>   ...
>   scl = subclass 'Exp', ['Exp'; 'Closure']  # ['pge'; 'Exp'; 'Closure']
>   ...

It's the ['Exp'; 'Closure'] that bothers me here -- I don't think
that a subclass should have to include the name of its parent in
the class name.  It should be:

    scl = subclass 'Exp', 'Closure'    # ['pge'; 'Closure']

However, writing either this or

    scl = subclass 'Exp', ['Closure']  # ['pge'; 'Closure']

gives me the "class Closure already registered" error that
started this thread.

-----

(*):  AFAICT, it's also not true that classnames and namespaces 
are "currently totally orthogonal", since the class' methods
have to be placed in a namespace that matches the classname.
So, a class named [ 'Exp'; 'Closure' ] must place its methods
in a [ 'Exp'; 'Closure' ] namespace.  

Pm

Reply via email to