Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^4: Recap: The Future of Perl 5

by LanX (Cardinal)
on Aug 29, 2018 at 17:23 UTC ( #1221314=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

IIRC is Ruby using sigils for @instance and @@class variables..

Python has self, JS has this.

But JS is setting this implicitly, i.e. it's not the first argument like self in Python and Perl.

You could mimic the semantics of JS and Ruby with closure variables holding references...

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

update
added references

update

PHP seems to have an implicit $this.

Replies are listed 'Best First'.
Re^5: Recap: The Future of Perl 5
by tobyink (Canon) on Aug 30, 2018 at 08:15 UTC

    Yep, PHP has an implicit $this, and also has self which refers to the current class (not object).

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2020-08-09 23:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which rocket would you take to Mars?










    Results (55 votes). Check out past polls.

    Notices?