Another one of my little annonyances in the current state of P6 is how
run-time properties are accessed.  Accessing properties as methods is
pretty, but I see it as potentially dangerous.

Adding a new method to a class that happens to be the same as
somebody's property would be lucky to get some kind of signature
error.  In the worst case (and unfortunately, probably the common one)
the method will have only internal side-effects, and it will be being
called at apparently random times.

Ick.

I think it'd be better to include some kind of "property hash" in
Object, or have a keyword for checking properties.

Also, junctions have this problem.  Apparently a junction only
distributes a method call if the method isn't in the Junction class
itself.   Consider this:

    $junction.$foo();

Depending on the I<run time> value of C<$foo>, the junction's method
would be called or its junctends' methods.  That's not right.

For this one, I don't think it would be too bad to have a global sub
C<states> that takes a junction as its argument.  That removes the
spooky intercepting delegation that the method way imposes.

It'd be fine if the delegated-to object was the same thing, but since
it can be user-defined (even another junction), delegation may not be
a good approach.

How do you get a junction of each junctend's states?

Luke

Reply via email to