Does JavaScript really need stateful and advance features?

@kaizhu256 - Not to sound harsh (I really do respect your opinions on everything), but why do you believe that these scenarios aren't very common? What evidence are you working with that tells you that we're all fooling ourselves and that you're able to see the real truth? You keep saying that practically all JavaScript development is (or should be) simple and basic, but how do you know this? Now you're claiming we're all in this echo chamber thinking the opposite, but how can you be so sure you're right, to the point that you're confident enough to state that we must all be fooling ourselves?

Edit: And really do feel free to share the reasons behind your belief on this. I know you've shared that in your own coding experience, you haven't needed to use advance JavaScript features, which is good and all. But, how do you know that no one needs these more-advacne features? (But, perhaps I made this edit too late, and you won't see this anyways)

Let me explain my personal experience on the matter. I don't expect you to agree with the conclusions I've arrived to from my personal experiences (that's why they're personal), but I do hope they should at least illustrate why my opinion that "complex JavaScript is not a niche" isn't just from an echo chamber from these forms, or the internet in general.

I work for a local company, primarily in JavaScript. We develop a web application used by hospitals. As I've mentioned previously, we're often maintaining a balancing act of trying to update old code while adding new features our clients want, and fixing bugs. Code will often stick around for many years before it gets rewritten, and during that time it'll often receive little updates. We try to keep our code simple, but we'll still apply a number of different JavaScript tools and techniques to aid in handling different issues. Since our team is comfortable with these tools, we have no problem using them and understanding how they work. Is it possible that I sometimes overabstract or overcomplicate the solution for a problem? Yes, I definitely do that, but there's also times when I underabstract, causing the code to be unstable or buggy, and sometimes we have to go back and fix it up. I've learned from experience that there's good times and bad times to use many of these different tools, but when used appropriately, they're immensely helpful in keeping code maintainable (I, for example, have specific stories about how a codebase with "const" can really help you track down bugs quicker than a codebase that doesn't use "const" everywhere. I also have many specific scenarios that come to mind of times when I'm refactoring or adding features, and my job has become a lot easier because of the abstractions or tools we use).

These tools also make sense to me. I understand why they exist, what they're for, why they're useful, and when they're not. Of course I'm still learning as well, but the point is that I'm not just using these tools by faith, simply because others said they work (but it sounds like you feel we're all just following by faith without experience). I know they work from experience. And I know these design patterns and language tools have been very helpful to the company I work for. And note that this is just one small local company that just happen to exist near where I lived. If these tools and design patterns are useful for this single local company near me, then how many other gazillion companies out there must also be in the same boat?

Now, as I said before, these are personal experiences, so they can't really be used to convince anyone else of the usefulness of these tools. But, what they can do is at least show why I believe complex JavaScript projects are not that niche of a thing, in fact, I feel like it's pretty commonplace. Is it possible that thin-client, simple JavaScript is even more commonplace? Sure. And it sounds like you deal with simpler JavaScript all of the time. But I also know JavaScript itself needs to be able to support large scalable applications (which it successfully does, so I see no reason to discourage people from using it for this kind of purpose if it's fully capable of fulfilling this task).

It sort of sounds like you think that we're all just using these abstractions because we've heard others say that they're good to use, and we're blindly following that belief without any solid evidence. So, if you can help us realize that all of this has no foundation, we should then understand the truth. What you'll need to realize is that you're fighting against something that's a lot more difficult than that to tear down, because these things aren't baseless, and we're not just taking these concepts up on faith. I have personal experiences that prove to me that they're valuable, and I'm sure others do too. So, not only do you have to reveal the reality of this "echo chamber" we're all in, you're also going to need to show us why we're all misguided in our meriod of personal experiences, and that's a much more difficult task to take on.

4 Likes