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

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] };

Comment on Re^4: [Perl 6] Any provision for a "dereferencing object"?
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2015-10-09 12:32 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (241 votes), past polls