4 ms·
> Okay, great, you're working in a language where you already effectively have to think of it as, 'I'm not telling you how to do this, just defining the concept
by Smaug123 7y ago
> Okay, great, you're working in a language where you already effectively have to think of it as, 'I'm not telling you how to do this, just defining the concepts.
I don't think this is really the same thing. You're discussing the object level; I'm discussing the meta-level.
Haskell is based around "define the concepts as you would naturally define them and I'll use that definition to create a program". However, this is entirely implicit in the language. Defunctionalisation explicitly reifies this, allowing the language to discuss how it does it.
I see your point as basically "what's the use of continuations? I already have `goto`".
- SilasX 7y agoI 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.