Dan Sugalski <[EMAIL PROTECTED]> wrote:

> The rule is that a method in a class has access to the attributes for
> that class and nothing else.

Ah, that was the reason of my confusion. Could you adapt the docs
accordingly:

,--[ pdd15 ]---------------------------------------------------
| DESCRIPTION
|        This is a reasonably straightforward object system. It
|        assumes that objects have:
|        ...
|        and that you can:
|        ...
|        ·   Get an attribute by name or offset
|
|        ·   Set an attribute by name or offset
`--------------------------------------------------------------

This takes for granted that you can manipulate any attributes of an
object w/o any constraint.

> ... We're not enforcing that rule at the low
> level, but compilers should never emit code for a method that has any
> knowledge of attributes outside the class the method is compiled into.

How *should* is "should"? Will Parrot automatically provide attribute
get/set functions (e.g. via some class .pragma)?

>>   classoffset Ioffs, PObject, Pclass

> It can go in if you want, or hold off for 0.1.1. Your call.

Its not needed. The current scheme is fine.

leo

Reply via email to