Jonathan Worthington wrote:
This is why properties seemed like a good fit: the vtable entries in
namespaces are optional, out-of-band information, only used in
loading. But, they could just as well be implemented as a separate
attribute in the namespace class.
Agree; looking now at what I had to do (walk the MRO) to get inheritance
of :vtable methods to work already, doing it with the data in properties
is no harder. That leaves the serialization issue as the main one. A
ruling on that, and I can implement :vtable using a property.
Can anyone think of a reason we shouldn't serialize properties? If not,
let's try it. If we don't like the results, we can back it out.
I suspect that originally it was expected that properties would only be
attached at runtime. But, since we have the option of flagging subs to
execute at various stages of compilation, it seems safe to assume that
properties can be attached at various stages of compilation too.
(leo
pointed out the double indirection, as you're looking up the vtable hash
in the property hash, is a performance issue - we can perhaps optimize
this later...I care more about getting the correct behavior right now).
He has a good point, but agreed, let's get it working and optimize later.
Allison