Hi,

Tom Sawyer <transami / transami.net> wrote:
> private variables being differnt from local ones how? further can a
> keyword like this work?. other keywords are just shorthands aren't they?
> well, maybe it can.

I haven't really read the parser yet, but I imagine that after the
detection of keyword "private", the parser/interpreter will call
"rb_define_private_method()" instead of "rb_define_method()".  Therefore,
in a similar way, after the detection of the keyword "private", any newly
detected "@var = ..." will not call "rb_iv_set()", but something like
"rb_private_iv_set()" which just simply writes the data in a separate
hash.  Now, the "... = @var" case is a little bit more tricky, but I think
it should invoke "rb_private_iv_get()" before searching using
"rb_iv_get()".

> you see that's interesting. that's what i purposed for local variables
> to end writer method ambiguities. ie. does x = 1 mean local variable x =
> 1, or self.x = 1.

I must be missing something.  Why can "x = 1" imply "self.x = 1"?

Regards,

Bill