Stuart Cook <[EMAIL PROTECTED]> wrote: > On 11/08/05, Larry Wall <[EMAIL PROTECTED]> wrote: > > I'll have to think about the rest of your proposal, but I was suddenly > > struck with the thought that our "platonic" Class objects are really > > forms of undef: > > > > say defined IO; # prints 0 > > > > That is, we already have an object of type IO that doesn't really > > have a value yet. And maybe that's the real difference between the > > class object and the metaclass object. And maybe we can reason > > about objects of type IO without worrying about the definedness, > > if all classes already include their own personal undef. > > Wow, that's crazy enough to actually work! > > This approach has a few nice properties:
One that you missed was that this syntax: my Dog $spot .=new(); Falls out of it quite naturally. On the other hand, there are other things that don't work quite so well: my Dog $spot; $spot.can('bark'); # Not until he's instantiated... On the gripping hand, maybe you should have to ask the metaclass about that anyway: $spot.meta.class_can('bark'); #No $spot.meta.instance_can('bark'); #Yes Hmm. -- Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]> Perl and Parrot hacker