Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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

by ambrus (Abbot)
on May 29, 2007 at 16:38 UTC ( #618002=note: print w/replies, xml ) Need Help??


in reply to [Perl 6] Any provision for a "dereferencing object"?

Good question. It's a bit related to Method chain object with easy syntax, and the __ object in Switch.

Replies are listed 'Best First'.
Re^2: [Perl 6] Any provision for a "dereferencing object"?
by blazar (Canon) on May 29, 2007 at 17:07 UTC

    Thank you for the additional reference. Actually I'm not much concerned here with pragmatism, i.e. with how "to do it" coming close to the real thing (because discussion both here and in the linked thread show that this is possible in reasonably simple ways both under 5 and 6) as much as with "philosophy", i.e. the real thing itself, specifically the "tail without the animal": can it be a beast in and of itself in Perl 6?

      We made it really easy to write closures and deref them in Perl 6 so that people would not feel the need to invent special syntax for deferred evaluation. So basically, you use curlies to delimit any kind of "tail without the animal", and calling a closure is how you add the animal back in. And closures have the advantage of taking additional arguments if you want multiple degrees of "animal" freedom in your locator. S12 is now clarified to indicate that $object.$methodname() is able to call into a closure as well as into a named method. Thanks.
        S12 is now clarified to indicate that $object.$methodname() is able to call into a closure as well as into a named method. Thanks.

        "Thanks"? No, thank you! (I added a link to the quote above and I'm reporting hereafter the relevant part of the Synopsis.)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2021-05-16 22:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (152 votes). Check out past polls.

    Notices?