|
On 22 Feb 2011, at 11:11, Axel Kittenberger wrote:
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.
Since 'goto' is a static construct I believe such kind of problems can be identified during compilation and result in compilation errors, thus 'goto' should be perfectly safe if implemented correctly, although somewhat restricted when compared to continuations.
-- Renato Maia Computer Scientist Tecgraf/PUC-Rio __________________________ http://www.inf.puc-rio.br/~maia/