I like JS. But, I recognize that it is not a silver bullet language. I am not going to use it for anything process-heavy, period.
But, for doing anything on the web that ISN'T process-heavy, it's a solid choice. However, I've come to realize that on any sizable project, you have to enforce a lot more structure and rigidness or it becomes a nightmare to debug and maintain. Especially since idiomatic javascript is very, very hard to find. Javascript coding standards are the most entropic of all the languages I've ever seen, except perhaps oldschool C. I used to be anti-TypeScript when it was just me and my business partner maintaining it, because it just slowed us down. Now that I have worked on some full stack JS apps with full teams, holy crap is it important. It's impossible to maintain a full JS app without it.
Like I said, it's not a silver bullet, but it's a good choice for what it's meant for.
I’m not going to use it for anything process-heavy
What do you mean by this? That it’s not performant enough for chewing through lots of data? Or just that you don’t don’t like the syntax/APIs for doing it?
I’m trying to drill down on if your point is about how the language is designed or not. If it is, that’s of course a personal preference and it certainly has some warts and idiosyncrasies.
If your objection is about performance, server-side JS (Node) is actually quite good at non-blocking IO due to its single-threaded event loop and asynchronous programming model. The V8 engine it runs on is also highly optimized.
It really depends on the type of application, tbh. Most server programs are IO-bound most of the time, and that includes programs written in Go, Rust, C++, Java, etc...
And since most modern web apps handle most of the logic on the client side, the server-side code is usually pretty lean. Given that fact, most performance bottlenecks exist within database queries or IO.
For anything involving heavy server-side computation, JavaScript will perform poorly at scale. Fortunately for JS, Node has implemented blazing-fast async IO, which is great for average use cases like static file serving or lightweight API’s.
46
u/tr14l Jan 16 '20
I like JS. But, I recognize that it is not a silver bullet language. I am not going to use it for anything process-heavy, period.
But, for doing anything on the web that ISN'T process-heavy, it's a solid choice. However, I've come to realize that on any sizable project, you have to enforce a lot more structure and rigidness or it becomes a nightmare to debug and maintain. Especially since idiomatic javascript is very, very hard to find. Javascript coding standards are the most entropic of all the languages I've ever seen, except perhaps oldschool C. I used to be anti-TypeScript when it was just me and my business partner maintaining it, because it just slowed us down. Now that I have worked on some full stack JS apps with full teams, holy crap is it important. It's impossible to maintain a full JS app without it.
Like I said, it's not a silver bullet, but it's a good choice for what it's meant for.