News for hackers. Stuff that matters.
Re:To boldly go where Node man has gone before by cageface on Wednesday May 16, 2012 @11:07PM (#3985177)
You can do non-blocking I/O without the nested callbacks you have to use for everything in Node. You just fire off a block to a goroutine and then code sequentially there.
Re:To boldly go where Node man has gone before by zoips on Thursday May 17, 2012 @12:22AM (#3985410)
Re:To boldly go where Node man has gone before by jerf on Thursday May 17, 2012 @03:12AM (#3985846)
No, and no, respectively. Hacked together libraries to sort of support rewrite it at the wrong level of the stack (the compiler should be doing the continuation transform, anything else will lack performance due to having to jump through a lot more hoops) and merely having generators is not the same thing. And neither solution you propose will give you true preemptive multitasking. Do you know how you fire off a long computation in Go or Erlang? You just do it. No marshalling, no blocking, no dealing with OS processes, no fuss.

Neither of those two things are new ideas. Python has had generators forever. If it solved the underlying problems, Go would never have been written.

Re:To boldly go where Node man has gone before by pjscott on Thursday May 17, 2012 @01:21AM (#3985562)
Both look useful, but aren't exactly well-supported by the library ecosystem. In Go, faux-blocking I/O is standard, and all the libraries support it; it's not something bolted on as a handy afterthought.