Re:Defunctionalisation: An underappreciated tool for writing...
by SilasX on Tuesday March 10, 2020 @02:48PM
(#22538293)
I confess a lot of this is over my head. So, not a lot to contribute further here. However:
>I see your point as basically "what's the use of continuations? I already have `goto`".
If I were trying to convince skeptics about the merits of structured programing (i.e. no goto), I wouldn't start from Java and merrily introduce try/catch in that context. I start from a BASIC program, explain the semantics of e.g. a while loop, and replace some program's gotos with while loops, and then tackle increasingly "stubborn" gotos.
And yes, I hope you would be able to explain the benefits of continuations to a goto-fanatic, regardless of how much inferential distance there is.
>I see your point as basically "what's the use of continuations? I already have `goto`".
If I were trying to convince skeptics about the merits of structured programing (i.e. no goto), I wouldn't start from Java and merrily introduce try/catch in that context. I start from a BASIC program, explain the semantics of e.g. a while loop, and replace some program's gotos with while loops, and then tackle increasingly "stubborn" gotos.
And yes, I hope you would be able to explain the benefits of continuations to a goto-fanatic, regardless of how much inferential distance there is.