News for hackers. Stuff that matters.
Re:After a year of using Node.js in production by MichaelGG on Tuesday May 03, 2016 @03:39AM (#11618661)
How is JavaScript so special with async and streams? JS lacks any syntax for async, so it's not on par with languages that do. What's special there? Same for streams: they're implementable in any language, and JS has no special capability there. Or am I unaware of something JS has that other languages lack (besides popularity)?
Re:After a year of using Node.js in production by Kequc on Tuesday May 03, 2016 @04:20AM (#11618833)
When javascript performs an asynchronous operation it doesn't block the thread. It stacks everything on a queue and then just works through everything as fast as possible. Any other language would require a separate thread for each operation.

I'm sure there's one other language out there that does it too but I don't know what it is.

Event based programming effectively means that as long as it has something to do it's doing it. You tell it to wait? It says great I've got all this other stuff to do.

Streams you may have me there, I didn't realise those were so widely used in other languages. Javascript works pretty well because you can run it on the whole stack. Share code between the front and back end. Stream from one place to another and around the corner.

Re:After a year of using Node.js in production by pathsjs on Tuesday May 03, 2016 @04:52AM (#11618952)
Python, Scala, OCaml, Nim, Haskell and more all have asynchronous operations for I/O - it's not something that is a JS only thing
Re:After a year of using Node.js in production by beders on Tuesday May 03, 2016 @01:54PM (#11622807)
Vert.x basically gives you everything that node.js has - and it spins up several event loops, making your code scale without having to run several node processes.

It also allows you to mix in worker threads that are allowed to block (for I/O, for example).

You can develop in JavaScript, Java, Ruby, Ceylon, Groovy.

It's fast, async and robust.

Re:After a year of using Node.js in production by kalms on Tuesday May 03, 2016 @04:13AM (#11618802)
I think it's more a matter of it being the only way to get things done in JavaScript and Node.js specifically (an overstatement, but that seems to be the sentiment).
Re:After a year of using Node.js in production by Klathmon on Tuesday May 03, 2016 @06:45AM (#11619406)
Personally I just like that things are async by default.

That means that if you are using a 3rd party library, it will be async from the start.

In something like python you need to work to get a fully async app, but in node you should file bugs if something blocks on IO.