I'll provide more samples in the repository next week since I’m a little busy 
in these days. :(

You’re right, the function would be compiled and evaled multiple times if it’s 
in a function would be called again and again. That’s the case should be 
noticed when using Wind.js in dev mode. So Wind.js also provides a pre-compiler 
to transform the code before production deployment, or I think we can do 
something like Streamline to provide an additional command to start the program.

Thanks.

老赵 | Jeffrey Zhao
Blog: http://blog.zhaojie.me/
GitHub: http://github.com/JeffreyZhao/


From: Bruno Jouhier 
Sent: Friday, August 24, 2012 2:43 PM
To: [email protected] 
Subject: Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

Jeffrey,

Can you give a small example of a Wind function that calls fs functions  in 
sync style, without wrapper (but with the other builder). I'm still puzzled 
about how this can work. The "complete" event answers the other side of my 
question.

Regarding eval, I agree that they it will be called only once in the case of 
functions and methods that are defined at top level in a module. But what about 
async functions that you define inside other functions (closure case)? In this 
case, eval will be called every time you call the containing function.

Bruno

-- 
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

-- 
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

Reply via email to