While there's nothing particularly wrong with CPS it seems to be somewhat obfuscated. I can't remember why, but I have found occasion to write things directly in CPS, it made sense at the time, but I am having a hard time thinking of it now. In some cases you can get by with things like "todo" data that is accumulated, if the continuation is relatively local this kind of data flow is clearer than creating closures and continuations IMO.
The only benefit of CPS is that everything is a tail call. If you're trying to turn a recursive algo into an iterative algo then a little mechanical CPS conversion can help one find the right structure. (But you'll still probably pass POD rather than continuations.) Especially for some simple tree recursion you can manage this if the problem is not too generic.
Name:
Anonymous2011-12-12 13:03
>>3
But you can implement return and return-from through call/cc!
Even Haskell folk would agree, return-from is purely-functional!