4 ms·
There are tons of better options to choose from. If you're not making a web UI, literally any choice is better than Javascript, unless that is the only language
by 10098 13y ago
There are tons of better options to choose from. If you're not making a web UI, literally any choice is better than Javascript, unless that is the only language you know.
- bcoates 13y agoCompared to most languages you'd use for a commandline application, node has a simple, usable async I/O interface, and the libraries you can get for it actually assume async. If you need that, there are only a handful of choices and node is one of them.
- mhd 13y agoWhich scripting language doesn't have an async library available (most of which don't descend into the Chinese Hell of Being Called Back Ad Infinitum)? Granted, most of the other languages have lots of libraries that don't play well with async, but then again, that's mostly because they have lots of libraries. And it's not like there's a guarantee that a random Node package won't screw you up, either. I'm not really arguing against using JavaScript for command-line interfaces. I'd much rather see that than the same in PHP, and if the programmers don't know Perl, Python or Ruby, then why not? We're talking about an area where there are still way to many hacks that consist of badly written bash scripts with lots of inline sed and awk...
- zeckalpha 13y agoconcurrency != async
- aegiso 13y agoBrainfuck, then :). People don't use node for the Javascript. They use it for the modules, and node is the glue that coheres them (and does an admirable job at that). When you're comparing writing a CLI app in node to writing it in something else, it's a world of difference, and that difference is npm. With good modules, writing a CLI app has little to do with Javascript -- you're more specifying config and flow by passing some options and streams around, and you're done.
- 10098 13y agoHow about writing it in Perl and using CPAN instead of npm then? There are tons of modules in CPAN. But since Perl is not cool any more, there's always Python and pip.
- kephra 13y agoI have yet to see any language repository that constrains quality in the way CPAN does with CPAN testers. CPAN modules must provide POD documentation, must provide a regression test, and must run on several dozen platforms before PAUSE accepts to publish it on CPAN. Python or Ruby modules, or my favorite Lua, are a bunch of junk compared to CPAN.
- deleted 13y ago[deleted]