> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On
> Behalf Of Jesse Schalken
> Sent: Tuesday, May 24, 2016 11:42 AM
> To: Yasuo Ohgaki <[email protected]>
> Cc: Dmitry Stogov <[email protected]>; internals <[email protected]>;
> Nikita Popov <[email protected]>; Bob Weinand <[email protected]>; Xinchen Hui
> <[email protected]>
> Subject: Re: [PHP-DEV] [RFC] Fix inconsistent behavior of $this variable
> 
> On Tue, May 24, 2016 at 5:54 PM, Yasuo Ohgaki <[email protected]>
> 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