> -----Original Message-----
> From: jesseschal...@gmail.com [mailto:jesseschal...@gmail.com] On
> Behalf Of Jesse Schalken
> Sent: Tuesday, May 24, 2016 11:42 AM
> To: Yasuo Ohgaki <yohg...@ohgaki.net>
> Cc: Dmitry Stogov <dmi...@zend.com>; internals <internals@lists.php.net>;
> Nikita Popov <ni...@php.net>; Bob Weinand <bwo...@php.net>; Xinchen Hui
> <larue...@php.net>
> Subject: Re: [PHP-DEV] [RFC] Fix inconsistent behavior of $this variable
> 
> On Tue, May 24, 2016 at 5:54 PM, Yasuo Ohgaki <yohg...@ohgaki.net>
> wrote:
> 
> > Jesse,
> >
> > $this must be a object you're accessing.
> >
> 
> Why? I consider it a kind of implied parameter. You can reassign self in 
> Python
> for example.

Jesse,

You consider it an implied parameter, we considered it to be a representation 
of the currently scoped object at the language level.
Your way is not inherently wrong - but you know that already, as you've 
demonstrated other languages that allow this.
And while it's not wrong, it's also not the semantics we agreed upon for $this 
in PHP.

> I'll have to take your word for it. I just thought the language would be 
> simpler
> with fewer "special" things that don't need to be special.

While we could debate whether it’s more or less special, an implied parameter 
is also special.  So we wouldn't have fewer special things, just different ones.

Zeev

Reply via email to