[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Continuations (was google summer of code)
- From: Axel Kittenberger <axkibe@...>
- Date: Tue, 22 Feb 2011 15:11:10 +0100
Okay, I'm sorry for the thread hijack, please leave the google summer
of code thread in peace with further continuations. So I start that
one, so the Google Summer can continue in peace.
roberto> It always strike me why gotos are considered evil and ugly,
roberto> but continuations, which are a completely unrestricted form
roberto> of computed/assigned gotos, are considered beautiful. Maybe
roberto> the problem with gotos is that they are too restrictive?
Yes an interesting observation.
I've no first hand experience on the former, just a lot with the
second (in language that are structures with loops otherwise) like the
early days of basic. And it is considered harmful for reason. With
continuations I cannot say to have ever worked with a project that
made heavy use of it and what it means for
maintenance/understandabilty. The continuation was another
take/mechanism to look if it might be accepted by the lua community
and leadership to get more branching control with it :-)
So far, continuations seem safer to me, as they always re-construct a
functional stack, leaves no variables unasigned. In that way I see
them more restricted. You can only continue (back) to a point in the
code/stack where it already was, while a goto can jump around
arbitrarily. And in other languages damage the stack when done
wrongly. hat continuations can also be first-class-values sounds cool.
Might correct me if I'm wrong, but with continuations you can do all
what coroutines can, and more, or?
I just considered GSoC a good time to suggest a project to have a
student that wants to, to experiment what i would lead to and what
would be possible/impossible, and what it would mean for code elegance
vs. maintaining problems.