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

Re^4: [Perl 6] Any provision for a "dereferencing object"?

by blazar (Canon)
on May 29, 2007 at 11:53 UTC ( #617946=note: print w/replies, xml ) Need Help??


in reply to Re^3: [Perl 6] Any provision for a "dereferencing object"?
in thread [Perl 6] Any provision for a "dereferencing object"?

$dereferencer = { .<foo>[1]<bar><baz>[3] };

I knew that "unary" dot acts implicitly on $_, but appearently your code implies that in code written as a bare block $_ is an alias to the first positional argument, and that I didn't know. Actually, without knowing, I would have written the above amongst other possibilities, like:

$dereferencer = -> $d { $d.<foo>[1]<bar><baz>[3] };

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://617946]
help
Chatterbox?
[Corion]: erix: It wouldn't be nice of me to publically shame and name ;)
[Corion]: I'm interested in how their product actually works. It uses websockets between two non-browser components, so there are some weird technology decisions, or rather, I assume the product started out as something completely different :)
[erix]: fair enough

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2018-04-19 12:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?