go ahead... be a heretic | |
PerlMonks |
Re: Continuations in Perl - Returning to an arbitrary level up the call stackby BrowserUk (Patriarch) |
on May 18, 2013 at 23:09 UTC ( [id://1034164]=note: print w/replies, xml ) | Need Help?? |
I have a need to return from a deeply nested function, not to the caller, but to a higher point up the call stack. Every time I've found my code needing something as crazy as that, I've thrown the code away, got drunk/sober/laid/slept, whatever it took me to forget the idea and then come back and started over. What you are suggesting sound likes bypassing the stairs by jumping from one landing to the next; and whilst Parkour makes for some great movie chases and youtube clips; designing a building that relied on it for emergency exits just isn't on. But that exactly what you are doing by designing your code to rely upon such shortcuts. I bet if you were to describe your application in sufficient detail that you'd get a raft of better solutions that don't require the equivalent of leaping from one tall building to the next as part of your daily commute. With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|