@Raynos and Bruno Jouhier Creating a good language and good supporting functionality is not about catering to what *you* like or what *you* are ok with dealing with. Its about creating easy to use, powerful functionality that can be combined in ways that
A. make new ways of doing things possible, so people can experiment and improve, and B. allow people to program and think in a way that more closely matches their programming domain By saying "We don't need them, because people that do are lazy" shows how little you know about good design. You *should* be the lazy programmer<http://blogoscoped.com/archive/2005-08-24-n14.html>because lazy programmers don't like doing repetitive monotonous work that drives down their productivity and creativity. The argument here is not about making every programmer write synchronous versions of every method. This is how the core 'fs' module works, and tho it's useful, its also bad design. Futures/promises are the solution to this. No one needs to write two versions of functions. Futures allow for much more maintainable code, as well as having the ability to write code in new, non-cludgy ways. Node.js was originally planning on using futures as the main concurrency scheme, but apparently the designers were overwhelmed by different dogmas as to how futures should work that they just said "fuck it" and went with callbacks, which aren't flexible but are dead simple. This was short sighted of them. On Thursday, December 1, 2011 9:11:05 AM UTC-8, Raynos wrote: > > On Dec 1, 4:51 pm, Jake Verbaten <[email protected]> wrote: >> > You can use the sync version of any APIs available. >> >> Q: why do we need/have sync APIs? >> >> I would not mind if node did not have any sync APIs (not even >> require). At least nobody would be tempted to put a blocking call in >> the middle of a module. > > > I'd agree we don't need them. They are there when people are too lazy to > use the async version. > -- -- 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.
