On Thu, May 25, 2006 at 01:09:47AM +0100, Jonathan Worthington wrote: > This looks pretty nice.
Sometimes "dynamic" is remarkably convenient. :-) > 1) (Can we|Will we be able to) do the whole newclass/addattribute/addmethod > thing at compile time (in a :immediate), so that you have your classes > defined and just freeze the class PMC, then thaw 'em and be done when you > run? It should work. If not, patches or tickets welcome. Note, though, that the thawed PMC will vary from the frozen original in one respect, by design: new type numbers must be assigned on each thaw. When this happens, ParrotClass, and all other class-like PMCs, should be able to cope. If any of the above doesn't happen, patches or tickets welcome. > 2) What about class (aka static) methods? At this point, IIRC, class and object methods all live in the same namespace. Some HLLs are probably OK with that -- Perl 5 for example does fine with this arrangement [not that Perl 5 will be creating ParrotClasses]. But obviously this is not a tenable situation long-term. In the short term you may have to hack up a workaround, like mangling all class method names or something. -- Chip Salzenberg <[EMAIL PROTECTED]>