Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^9: Experimenting with Lvalue Subs (trade-offs)

by fergal (Chaplain)
on Jan 25, 2005 at 16:28 UTC ( #424919=note: print w/ replies, xml ) Need Help??


in reply to Re^8: Experimenting with Lvalue Subs (trade-offs)
in thread Experimenting with Lvalue Subs

Actually I think your :sassign idea is implementable now using attributes. When you hit a sub with that attr you just need to whip it out and replace it with a sub that returns a tie which calls the original with the extra lvalue argument. Obviously you'd not be happy with the implementation but it would be worth doing just to be able to play with your sassign idea and see if you like it.

Yes, for the rare cases, it increases the number of calls. For the common cases, it can reduce the number of calls and complexity.
Increasing the number of calls is not just an efficiency issue, it's potentially a correctness issue, calling twice when previously we called once could do something nasty.


Comment on Re^9: Experimenting with Lvalue Subs (trade-offs)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (11)
As of 2014-07-10 11:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (207 votes), past polls