On Sat, 19 Aug 2000, Randal L. Schwartz wrote:
> I'll have an adjacent cell. I actually like that *better* than $self.
> Let's not stop there though. Perhaps we need "self" and "super" and
> "thisContext". Only half joking... this would solve a lot of the
> hacking issues. self could be a "die" if we weren't called as a
> method, and then we wouldn't need to have a separate "method" type.
> Oooh. Getting better all the time! Or maybe just return undef, and
> let the method call fail on the undef, or we could check it ahead:
>
> if (my $me = self) {
> $me->do_this
> } else {
> $CGI::Q->do_this
> }
>
> To steal from CGI.pm's problem. Or, if it threw an exception:
>
> try {
> self->do_this
> } error {
> $CGI::Q->do_this
> }
>
> or whatever the syntax is this week.
Given the above examples, how many other things would break if $ME/self
were implicit, and automagically pointed to the right object or
package? The above would be reduced to
do_this();
in both procedural and object code.
--
Bryan C. Warnock
([EMAIL PROTECTED])