Me writes:
: > But suppose you want all .foo to refer to self and not
: > to the current topic.
: 
: What about
: 
:     given (self) { .... }

That wouldn't have the same effect as what we're talking about--it'd be
overruled by any C<given> within.  We're talking about how to make .foo
mean self.foo regardless of the current topic.

: Also, what about
: 
:     use invocant;
: 
: resulting in all method bodies in scope getting an implied
: surrounding given (self) { .... }.

Er, methods already assume that.

: And what about 'me' or 'i' instead of 'self'?

I think "me" is too close to "my".

: And "use me;" instead of "use invocant;"?

And here "me" is referring to something that doesn't even necessarily
exist at the time of the declaration.  Who is "me" at this point?

In any event, I'm inclined to think that this whole "selfish" notion of
the object is a bit of a misnomer.  We are a programmer.  We are not an
object.  We use "my" on lexical declarations because it's my piece of
code.  Some of that code just happens to deal with objects, but objects
are "them" more than they're "us".  C++ probably has the more accurate
idea here with "this", but maybe we've finally found a good place for
the occasionally proposed "it":

    it.foo(1);

or even better:

    close it;

On the other hand, "it" doesn't interpolate too well.  And $_ is still
pronounced "it"...

But think of the commercial possibilities if your program starts out:

    just use it;

Though I do wonder what

    use it or lose it;

would mean...

Larry

Reply via email to