Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Re: Re: Re: Re: (Perl6) Groking Continuations

by Elian (Parson)
on Apr 11, 2003 at 22:55 UTC ( #249995=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Re: Re: (Perl6) Groking Continuations
in thread (Perl6) Groking Continuations

What it does is complicate things rather a lot. Continuations are an old, old language feature. Unfortunately many folks doing language work didn't think about then when new language features were developed, so there are things which may not necessarily play well with continuations. They'll work, but may not be an optimal combination.

In the block exit case, finally clauses will be executed each block exit, which may be somewhat surprising, but not fundamentally an issue. The bigger issue is with things like local/temp/hpyothetical variables.

  • Comment on Re: Re: Re: Re: Re: (Perl6) Groking Continuations

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: (Perl6) Groking Continuations
by John M. Dlugosz (Monsignor) on Apr 17, 2003 at 19:40 UTC
    So you could have it both ways: the finally block is done every time, and the restore code on a temp variable is done only when it's gone for good?

    But, I think many C++ programmers think of using the former for the purpose of the latter. Especially any code that wants to undo/fixate things by playing with the caller's blocks (as mentioned in earlier discussions) it needs to be clear that setting up something triggered when a variable goes out of scope (e.g. restore from a temp) is not the same as code that's simply inserted just before the close brace of that scope. Earlier, your comments about doing without prompt destruction made me think that we would indeed be using the "finally"-like mechanism for that purpose.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://249995]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2017-01-24 05:04 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (203 votes). Check out past polls.