Re:Fixing the callback spaghetti in node.js
by thomasz on Thursday September 29, 2011 @03:32AM
(#3051511)
I don't fully understand why this makes callback hell better just because it is known under a nicer name. CPS has it's use cases, but application code is not one of them.
Re:Fixing the callback spaghetti in node.js
by seabee on Thursday September 29, 2011 @03:55AM
(#3051554)
Specifically, CPS was intended as a mechanical program transformation to remove the stack, not a style for programmers to actually write their programs in.
"Programs can be automatically transformed from direct style to CPS." [1]
Do the math.
[1] http://en.wikipedia.org/wiki/Continuation-passing_style