DEV Community

Discussion on: 🚀 5 Reasons Why You Should Bet on JavaScript in 2020

Collapse
 
jouo profile image
Jashua

Are there any disadvantages to use JavaScript for everything? I was hoping to see that point covered, it's an honest question since I don't know that language but I'm aware of the hype around it

Collapse
 
kayis profile image
K • Edited

It doesn't have the best performance characteristics.

Also, JavaScript is dynamically typed. This can lead to some problems in the long run.

I'd recommend Rust or OCaml/Reason if these points are important.

Collapse
 
iamschulz profile image
Daniel Schulz

Of course. Javascript in web development is used in places where precursing technologies were way better fit.
HTML is arguably better than JS at displaying content. Browsers are more efficient just displaying styled hypertext compared to executing a heavy framework to render a virtual document.
Backend-wise javascript can have some serious disadvantages compared to other languages, such as weak types, automatic garbage collection, etc... Most of these things can be worked around, but all those workarounds add complexity (which I'd argue is the single most important problem in software development).
Javascript is a very mighty language, but it may not be the best tool for every problem it's being used on.
If all you have is a hammer, every problem looks like a nail.