News for hackers. Stuff that matters.
Re:An Object is not a Hash by zinkem on Tuesday October 09, 2012 @02:00AM (#4630202)
It actually isn't completely alone in using an asynchronous paradigm, as you suggest. Delegates in iOS/Cocoa and events in Java work in a similar fashion. Function-queue architectures are not unique to Javascript.
Re:An Object is not a Hash by andrewvc on Tuesday October 09, 2012 @10:42AM (#4631752)
My point exactly. Both of those languages are synchronous by default, async is an option. JS is async only pretty much*

* while there are blocking calls in node, they are by far the exception. It is not multi-paradigm like Java

Re:An Object is not a Hash by zinkem on Tuesday October 09, 2012 @03:22PM (#4633485)
I'm not sure I see the distinction you're identifying. If you're ever written code on the iPhone, everything is done via events. All the code you write is responding to an event fired in the runtime. Any synchronous network calls you make will block the UI thread, so asynchronous calls are the right way to access network resources. This same reasoning is why Node.js libraries are primarily async. It's the right thing to do.

edit: To expand, the alternative is to fire off threads for each connection so you can write 'synchronous' code... the whole point of nginx and node is so that you don't need the overhead of creating a separate thread for each connection, asynchronous code is the natural result of this decision.