On Sun, Jul 06, 2008 at 07:23:30PM -0400, Andrew Whitworth wrote: > On Sat, Jul 5, 2008 at 11:34 AM, Patrick R. Michaud (via RT) > <[EMAIL PROTECTED]> wrote: > > If there's agreement on using a method-based form, I think I can > > implement it fairly quickly, and we can update PDD21 accordingly. > > I would tend to disagree, if only out of respect for symmetry with the > get_namespace, get_hll_namespace and get_root_namespace opcodes that > we already have. However, I do see a big benefit to keep around fewer > opcodes, to help reduce bloat and increase maintainability. I would be > more amenable to this idea if we had a way of migrating the existing > opcodes to the namespace PMC as well.
The difference between the existing get* opcodes being that those operations are used incredibly frequently, and thus deserve an opcode, but make_*_namespace is used very little, and so a method-based form makes more sense. The only reason I found this bug is because I discovered an obscure situation dealing with cross-HLL setup that needed the ability to create a namespace in another HLL namespace, which is what makes me feel that this is really a rare sort of operation that doesn't deserve an opcode. Stated a different way: symbol lookups are way more common than namespace creation. Not only that, but the way most namespaces are dynamically created is via the store_*_global opcodes, and not make_namespace. Thanks, Pm