On June 11, 2013 at 4:59:50 PM, [email protected] ([email protected]) 
wrote:
I'm reading JavaScript on the Server Using Node.js and Express. Having just 
read the chapter on modules, it seems overly restrictive to make require() 
refer only to files. It seems to me that a hosted module server could be really 
useful in some applications. Would this be a node.js issue or confined to 
JavaScript?



That's a node.js issue -- but it's one that's not easy to solve without making 
the simple cases harder. Remote modules implies asynchronous loading, which 
doesn't play nicely with the elegance of require.

It's so often better to separate data from code, and while data is loaded 
asynchronously, let code be synchronous. Then you can handle the remote loading 
case by downloading first (and automating this), then executing.
----

Aria Stewart

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to