Hah, when I wrote that I was thinking of qualifying it a bit better to prevent the very obvious objections.
It really depends on the language
and what kind of goto you mean.
But in the context of the post I replied to, yes, because you cannot replace algebraic effects with "neutered" gotos (like the ones in c), you need the equivalent of longjmp, or maybe gosub.
You can obviously design a language where goto does implicitely run finalizers or does similar fancy stuff, but this is again leaving the scope of the original discussion I think...
Goto tags and blocks/return-from have lexical scope and dynamic extent. Lexical scope means that one can goto to enclosing goto tags and one can return from enclosing blocks. "dynamic extent" means that corresponding scoping constructs tagbody and block not have been exited yet.
CATCH/THROW has dynamic scope and dynamic extent. Means that the CATCH targets will be looked up on the stack.
Then Common Lisp has UNWIND-PROTECT, which sets up a dynamic scope. When leaving this scope by a non-local control transfer, it is ensured that some specified code will be executed.
These are then building blocks for higher-level control, like the Condition System, which provides condition types, handlers, restarts, ... which is used then for error handling, where on error the stack is left like it is.
> Assembly lets you jump anywhere
it's just that jumping to some arbitrary place might not make sense.
setjmp/longjmp (aka goto on steroid) is a better example. Algebraic effects are sort of a structured (and, depending on the language, typed) form of sjlj.
It really depends on the language and what kind of goto you mean.
But in the context of the post I replied to, yes, because you cannot replace algebraic effects with "neutered" gotos (like the ones in c), you need the equivalent of longjmp, or maybe gosub.
You can obviously design a language where goto does implicitely run finalizers or does similar fancy stuff, but this is again leaving the scope of the original discussion I think...