Alek Storm wrote:

Do you mean a PCCMETHOD?  If we're just getting and setting attributes, I
really think we should be using getattribute and setattribute, or getprop
and setprop, instead of expanding the ParrotInterpreter namespace with a
bunch of simple getter and setter methods.

getattribute and setattribute are only implemented on ParrotObjects (and other implementations of high-level objects). And really, even on ParrotObjects getattribute and setattribute should only be called inside the class itself. All external code using the object should access the attributes through accessor methods (preserving encapsulation).

getprop and setprop are completely different, they access (extra) data attached to a PMC as a hash at runtime.

Read docs/ops/object.pod and docs/ops/pmc.pod.

Allison

Reply via email to