Well, you can pass around function pointers, return function pointers, and store function pointers in data structures in C, too. You can also use closures - a closure is just a (function pointer, struct with its closure values) struct. Sure, OCaml, Scheme, and company box the pair for you, garbage collect it, and don't make you flatten your code into a single file-level scope, but the difference between Javascript and C isn't as big as you think.
Javascript is kinda sorta maybe functional if you look at it right, but it's still mostly the same imperative/object-oriented mishmash as Java, Python, or Ruby.
Indeed. I'd certainly rather be able to nest functions, but C became a lot more powerful to me after I learned how to compile a bunch of high-level features to it. (Your 'ichbins' helped, by the way. That, LiSP, and some SML papers.) I'd still rather automate much of the heavy lifting, of course.
I'm weirded out by the idea of writing CPS-transformed code by hand for node.js, but apparently people like it? Perhaps it's something similar.
The thing I don't get about node.js is that it used to have a promise abstraction and they dropped it to go callback-only. I guess the abstraction leaked, in a language not built around it?
I like to imagine Node's success comes from bringing some of E's insights to a community just ready to use them, and if the cost is manual CPS, apparently it's not too high.
(Relevant E theory at http://erights.org/elib/concurrency/overview.html )
Javascript is kinda sorta maybe functional if you look at it right, but it's still mostly the same imperative/object-oriented mishmash as Java, Python, or Ruby.