> Similarly, when you fully grok functional programming, coding with callbacks will cease to feel unnatural.
I don't understand this comment. Javascript, while having first-class functions, does not have call/cc. This is the source of complaints that Javascript encourages callback-spaghetti. As people have mentioned elsewhere, continuation-passing style is meant for compilers, not humans.
Comments
> Similarly, when you fully grok functional programming, coding with callbacks will cease to feel unnatural.
I don't understand this comment. Javascript, while having first-class functions, does not have call/cc. This is the source of complaints that Javascript encourages callback-spaghetti. As people have mentioned elsewhere, continuation-passing style is meant for compilers, not humans.
Thanks! I couldn't have phrased it any better.
This is why I said it's like writing assembly.