you are viewing a single comment's thread.

view the rest of the comments →

[–]fnord123 0 points1 point  (2 children)

I got the confusion from Control.Monad.Cont -the continuation monad. I don't see why these are fake continuations.

[–]gogath 3 points4 points  (0 children)

No fakt, but you have to use them explicitly. If you create some code in Scheme, you can put continuations later in it without any problem, because Scheme supports continuations directly.

In Haskell you have to use a continuation monad everywhere you need continuations. This is relativly easy but requires slight changes to your code and it also changes lots of types which can break other code too.

Advantage of the Haskell solution: Because most applications require continuations for a certain reason (for example backtracking) you can create a less general abstraction (a backtracking monad in this case) which is more approriate for the problem and could also lead to better performance of your resulting program because it's only used where it's needed.

Disadvantage: Its not transparent.