V8 team will start working on generators

269 views
Skip to first unread message

cpprototypes

unread,
Mar 28, 2013, 3:17:30 PM3/28/13
to nod...@googlegroups.com
Source: http://code.google.com/p/v8/issues/detail?id=2355

I think generators have the potential to greatly change how node.js code is written (for example it could look like this http://taskjs.org).  However, it depends on many factors:

1) How easy will it be to migrate existing node.js code?  It seems that most of the community has decided that a simple async library (https://github.com/caolan/async) is good enough instead of promises.  So it may be difficult to migrate that to something like tasks.js or anything else using generators.

2) Since node.js developers are used to chaining callbacks and using async library, there may be a lot of inertia to overcome before generators can have much impact.

3) What kind of impact, if any, will generators have on the core node.js API? 


Ben Noordhuis

unread,
Mar 28, 2013, 3:31:20 PM3/28/13
to nod...@googlegroups.com
We won't be switching over right away, if that is what you mean.
We'll probably let user modules duke it out first, see what works and
what doesn't, then steal^Wuse that as a source of inspiration.

Floby

unread,
Mar 29, 2013, 6:40:38 AM3/29/13
to nod...@googlegroups.com
Generators have some nice applications. Like iterators and such.
I wrote https://github.com/Floby/node-object-iterator to return a generator and it was sometimes a pain to keep states and such.

Bruno Jouhier

unread,
Mar 29, 2013, 8:53:27 AM3/29/13
to nod...@googlegroups.com
Good news!

For us the migration be a one line code change! Will be interesting to compare the performance between generators and callbacks.

Bruno

Marcel Laverdet

unread,
Mar 30, 2013, 12:22:15 AM3/30/13
to nodejs
?_? node has had generators since early 2011.

;) ;) ;)


--
--
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 nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
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 nodejs+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Mark Hahn

unread,
Mar 30, 2013, 2:49:48 AM3/30/13
to nodejs
node has had generators since early 2011

Reference please?

Alex Kocharin

unread,
Mar 30, 2013, 3:59:25 AM3/30/13
to nod...@googlegroups.com
 
He was probably talking about node-fibers
 
--
// alex
 
 
30.03.2013, 10:50, "Mark Hahn" <ma...@hahnca.com>:

Marcel Laverdet

unread,
Mar 30, 2013, 5:24:53 AM3/30/13
to nodejs

Arunoda Susiripala

unread,
Mar 31, 2013, 9:58:16 PM3/31/13
to nod...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages