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. class MyClass: def foo(self, p1, p2): self = 7 print(self, p1, p2) c = MyClass() c.foo(8, 3); # 7 8 3 I can't think of anything else that allows it, though. If you can change $this, you'll suddenly loose object. > That's what tends to happen when you assign a variable. > PHP 4 treated $this as regular variable and caused lots of problems. > 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. > Regards, > > -- > Yasuo Ohgaki > yohg...@ohgaki.net >