Re: Classes as special undefs (+ slot call syntax proposal)

2005-08-12 Thread TSa
TSa wrote: :Pair%Hash $Item@Array Here I forget to mention the beautiful symmetry: | arity access | 1| 0..Inf ---+---+- keyed | :Pair | %Hash positional | $Item | @Array Regards, -- $TSa.greeting := "HaloO"; # mind the echo!

Re: Classes as special undefs (+ slot call syntax proposal)

2005-08-12 Thread TSa
HaloO, Larry Wall wrote: On Thu, Aug 11, 2005 at 04:47:49PM +0200, TSa wrote: : >defined($spot); # false!? : : true! Even for my $spot = ::Dog because when my is evaluated the : name ::Dog has be be bound, AUTOLOADED or by whatever means become : available. What does binding have to

Re: Classes as special undefs

2005-08-11 Thread Larry Wall
On Thu, Aug 11, 2005 at 04:47:49PM +0200, TSa wrote: : >defined($spot); # false!? : : true! Even for my $spot = ::Dog because when my is evaluated the : name ::Dog has be be bound, AUTOLOADED or by whatever means become : available. What does binding have to do with definedness? In Perl 6 t

Re: Classes as special undefs

2005-08-11 Thread TSa
HaloO, Stuart Cook wrote: 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... Are you objecting to the fact that it can't possibly return a valid method, or that it will inappropriately true/false (

Re: Classes as special undefs

2005-08-11 Thread Autrijus Tang
On Thu, Aug 11, 2005 at 04:47:49PM +0200, TSa wrote: > OK, let's play some manual type inferencing ;) Note that $spot here is intended to be dynamic typed, i.e. not subject to inference. :-) > >my $spot = Dog; > > $spot.does(Item of Dog), that means what ever the name Dog represents > was s

Re: Classes as special undefs

2005-08-11 Thread TSa
HaloO, Autrijus Tang wrote: What about this? OK, let's play some manual type inferencing ;) my $spot = Dog; $spot.does(Item of Dog), that means what ever the name Dog represents was stored or bound to $spot. defined($spot); # false!? true! Even for my $spot = ::Dog because

Re: Classes as special undefs

2005-08-11 Thread Autrijus Tang
On Thu, Aug 11, 2005 at 08:53:47PM +1000, Stuart Cook wrote: > On 11/08/05, Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]> wrote: > > One that you missed was that this syntax: > > > >my Dog $spot .=new(); > > > > Falls out of it quite naturally. > > Actually I tried to mention that indirectly,

Re: Classes as special undefs

2005-08-11 Thread Stuart Cook
On 11/08/05, Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]> wrote: > One that you missed was that this syntax: > >my Dog $spot .=new(); > > Falls out of it quite naturally. Actually I tried to mention that indirectly, but I'm glad you explicitly mentioned it. > On the other hand, there are ot

Re: Classes as special undefs

2005-08-11 Thread Brent 'Dax' Royal-Gordon
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