Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: What operator should perl5porters use for safe dereferencing?

by ambrus (Abbot)
on Jun 02, 2012 at 13:03 UTC ( #974001=note: print w/ replies, xml ) Need Help??


in reply to What operator should perl5porters use for safe dereferencing?

NOOOO!

I want &-> because it's so understandable. People who haven't seen it would be able to guess what it does. That won't happen with ~> .


Comment on Re: What operator should perl5porters use for safe dereferencing?
Select or Download Code
Re^2: What operator should perl5porters use for safe dereferencing?
by crashtest (Curate) on Jun 03, 2012 at 16:42 UTC

    Interesting - in contrast to your statement, I didn't understand the relevance of the ampersand until the very end of the discussion thread here and found its inclusion in the poll puzzling. I didn't read it as $bar *AND* call method method() on $bar; instead, I read it as the C "address-of" operator. Goes to show that what may seem understandable and intuitive to one person may not be at all for another.

      I guess you're right, the ampersand isn't so obvious.

      The problem is, reading the ampersand meaning address of could even make sense in perl. You could want an operator to create a bound method call, so eg. $object&->method creates a bound method like do { my $o = $object; sub { $o->method(@_); } }, and $object&&->method creates a bound method call weakly referencing the object.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2014-08-01 00:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (255 votes), past polls