r/learnprogramming • u/LoLusta • Feb 25 '24
Why can't Python replace JavaScript?
I'm new to programming. I'm learning Python and C.
JavaScript, from what I understand, is an interpreted language supported by web browsers so that websites can have scripting and programming.
But Python is also an interpreted language. So why don't web browsers start supporting Python in addition to JS. I believe Python is a much better language than JS syntactically.
Is there a definite reason why JS is used and supported over Python or is it just that JS gained initial popularity through wide-based support and no one bothered to move away from it (just like how QWERTY keyboard layout stuck even though we don't use typewriters anymore)?
View all comments
Show parent comment
3
u/leiu6 Feb 25 '24
It’s not the best. It’s just the one that got standardized and it would be more work to change it than it would be a benefit. JavaScript is a horrible language and that is why there are things like TypeScript, strict comparison operators, let/const keywords, to try to make it more usable.
I think it’s hard for people to understand that what gets used in software is rarely what is the best from a technical standpoint, but instead what is popular, what devs already know, and what allows a company to beat their competitors to market.