3 ms·
I don't think that model would fit all that well with node in particular. I'm not sure how would make a templating system like that play well with asynchronous
by tikhonj 14y ago
I don't think that model would fit all that well with node in particular. I'm not sure how would make a templating system like that play well with asynchronous calls. And using synchronous function everywhere won't work. (For example, I couldn't figure out how to read from STDIN synchronously, at all!)
But even if you do decide to use the synchronous functions everywhere, having all your function names end in Sync would just add unnecessary confusion.
So, while you idea certainly doesn't lack merit, it would make more sense for something other than node.
- crazygringo 14y agoHmm... you're quite right about that. At the minimum, there would have to be a per-page set of "code", which could contain async functions and result in a final callback, and then a separate per-page "template", which could not. And then that would kind of defeat the whole simplicity of the model, so you might as well use a proper framework. I guess that's why nobody's done it yet. :) Thanks!