Stevan Little wrote: > ^Dog is an instance of the MetaClass, while Dog (no ^ sigil) is the > "class" (actually it's a prototypical instance of the class which the > metaclass ^Dog describes, but you dont really need to know that to use > it). > > ^Dog.can(bark) # false > Dog.can(bark) # true
Wasn't the ^ sigil dropped in favor of a 0..^n list creation op? So the first line is spelled ::Dog.can(bark) # false instead? > Of course you have a conceptual circulatiry issue now because well,.. > what is a MetaClass? Well it could be an instance of a MetaMetaClass, > but what is that an instance of? This could go on forever (turtles all > the way down as it is sometimes called). > > But in practice you either just stop and say "this is as far as it > goes", or you bootstrap your class model somehow and "tie the knot". > I prefer the boostrapping as it is much more elegant and tends to > allow for much more flexibility. I agree. Your cicularity is basically an a-priori infinity conceptually one level outside of the meta system. And there will be an orthogonal type/kind system. > > IIRC, you can always create a new method for a class, even outside of > > its definition, simply by ensuring that the first parameter to be > > passed in will be an object of that type: > > > > method bark (Dog $_) { ... } > > I don't think this is true unless it is a multi method, in which case > it is not actually a method of the of the class, but instead just > DWIMs because of MMD and the fact we allow an invocant calling style > freely. Yes, the question of ownership of methods is still somewhat unresolved. I think we need to distinguish something I've called slots in an object from free (multi) methods that are defined outside of the class definition block. BTW, do the outsiders have access to the private data slots with the $! twigil? > > or maybe > > > > method Dog.bark () { ... } > > Yes that works too. Shouldn't that read Dog::bark? Why the dot? -- $TSa.greeting := "HaloO"; # mind the echo!