Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

yea same here. I wrote nodejs programs for years. the focus on the eventloop and everything being asynchronous is great for servers and network IO but does NOT make it the perfect choice for scripts. Its a different use case entirely.

scripts are supposed to be small simple programs that run in sequence and terminate. I shouldn't need to deal with concurrency primitives at all in that particular situation.



With modern JavaScript (as in last 5-7 years) it's pretty straightforward to write sequential scripts.


There's more to it than writing a simple sequential python, ruby or perl script. You have to write everything using async/await.


async/await are dead simple. And many Node libs have synchronous versions. It's pretty straightforward if you are familiar with the language. If you aren't, well that isn't really the fault of JS nor any different from bash or python, which can both be just as painful for those unfamiliar.


> scripts are supposed to be small simple programs that run in sequence and terminate. I shouldn't need to deal with concurrency primitives at all in that particular situation.

I suppose bash pipes are a concurrency primitive, but I don't object to them. I think it's more about appropriate primitives.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: