Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^4: Recap: The Future of Perl 5

by Ovid (Cardinal)
on Aug 29, 2018 at 16:57 UTC ( #1221312=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1221312]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2019-05-23 05:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (142 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!