Rakudo and other HLLs could greatly benefit from Parrot sorting out the "How and when do I declare a class?" mess. The best way I can see for us to help them is to ease the requirement that all classes need declaration in :load :init subs when compiling PIR or loading PBC by adding a bytecode segment for classes.
This segment should store attribute information (size, name), methods (name, pointer to appropriate sub in regular bytecode seg), parent information (pointer to other class), and (optional) class name. Anonymous classes referred to in bytecode can refer to the appropriate class in the segment. Named classes should also be available by name lookup. We'll need to add a freeze and thaw mechanism for classes and some mechanism by which HLLs can specify which classes they want to freeze, but if we can make this work (and it's not too much work), we can improve Rakudo's startup immensely. After that, we can figure out some declarative syntax for classes in PIR and avoid many other messes. -- c _______________________________________________ http://lists.parrot.org/mailman/listinfo/parrot-dev
