Re: Class names are virtual

2008-04-23 Thread TSa
HaloO, John M. Dlugosz wrote: Using Dog in an expression (rather than a declaration) returns an undefined protoobject of type Dog. Yeah, an avatar. But we already know that this is supposed to work: my ::Alias ::= Dog; but maybe the RHS of ::= (if not :=) has its own special parsing

Re: Class names are virtual

2008-04-22 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: For functions, types don't need to be treated specially from other arguments as in C++. Could you give an example of what you mean in C++ and how Perl differs from that? In C++, types are not first-class objects. You can't pass a type as a

Re: Class names are virtual

2008-04-22 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: HaloO, John M. Dlugosz wrote: They are mixed! Perl treats types as first-class objects. For functions, types don't need to be treated specially from other arguments as in C++. Looks like we need a third party ruling on that. Note that the HO

Re: Class names are virtual

2008-04-22 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: The point I want to make is that we cannot think of P::C and M::C as unrelated! There are the following typical uses of C in D: 1) as the type of the attribute $.a 2) as return type of m 3) as type of the local variable $b Within the body

Re: Class names are virtual

2008-04-22 Thread TSa
HaloO, John M. Dlugosz wrote: Larry, you've wanted to have class names used within a class be virtual. With various degrees of conviction across the synopses, you've wanted classes defined within a class to be overridable, or all classes referenced by a class to be overridable, speculating on

Re: Class names are virtual

2008-04-22 Thread TSa
HaloO, John M. Dlugosz wrote: They are mixed! Perl treats types as first-class objects. For functions, types don't need to be treated specially from other arguments as in C++. Looks like we need a third party ruling on that. Note that the HOW is the meta class object and the WHAT the protot

Re: Class names are virtual

2008-04-21 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: Second, I don't like the concept of a virtual method that returns a type. That horribly mixes type level and value level. From the They are mixed! Perl treats types as first-class objects. For functions, types don't need to be treated specia

Re: Class names are virtual

2008-04-21 Thread TSa
HaloO, John M. Dlugosz wrote: I hope you have a few minutes to look it over. I started to think it through. There are two quick remarks. In module M { class C { ... } class D { # lexical region where C refers to M::C method m1 () { my