in reply to Re^3: Recap: The Future of Perl 5
in thread Recap: The Future of Perl 5
I found this surprising, and had to pause to think for a second or 2. How common is it in other OO languages to not need "self" to reference instance variables in instance methods?Personally, I don't recall ever seeing it done without "self".(Been so long since I last used C++ that I had forgotten.)
Java does this too. You can disambiguate (if you have a local variable of the same name), with this. For example, this.x.
|
---|
In Section
Meditations