DEV Community

Discussion on: The JavaScript Paradox

Collapse
 
jeffreythecoder profile image
Jeffrey Yu • Edited

There is always a trade-off between performance and easy-to-write. More languages and libraries are created because both creators and developers want faster and easier development.

Just like you said,

JavaScript is probably more concerned with producing less JavaScript than anyone else.

And...

And if the best way to combat JavaScript is using more JavaScript, that's where we are.

We've seen JavaScript and Python took off due to the biggest reason that they are easier to write than static typed languages. The same thing with the rise of React and other libraries wrapping JavaScript with easier use cases. Then functional components and React hooks...

Does using a React have a worse performance than plain JavaScript? Yes. Does WASM beats JavaScript in benchmark? Yes. But better performance certainly always leads to more complex code.

Python is built upon C. C is built upon Basics. We can write code in assembly language, but no one is doing that.

Besides from easy to write, the monopoly of JavaScript and its libraries is majorly due to the close fit with the web development use cases nowdays.

Libraries became popular because they make handling user interaction, state and backend calls much simpler. If we are still using Yahoo and other Web1 applications with little user interactions, we probably don't need these libraries.

Yes JavaScript and Python are invented as scripting languages and not invented for large scale applications at first. But we need to view them with the use cases we have now.

If the performance and stability is the priority of a large scale application, it's definitely helpful to switch to WASM and static typed languages. Same reason for TypeScript.

But the easy to write for the rest 90% of medium to small scale applications is the priority. Combine with the MVP and lean product trends for millions of startups, they are definitely choosing JavaScript over others.

This is why I believe JavaScript and its libraries aren't going anywhere soon.