Maybe this is how we can fix JavaScript…

If there is such thing like a perfect programming language, JavaScript is definitely not in that category. Not just that is not perfect, is so bad that millions of developers had to spend billions of hours implementing alternatives, compilers, packages and so much other stuff just to try to make it work decent enough so we can make some damn web pages. And that is not all. Imagine the tone of effort to come in rewriting, refactoring and maintenance that is to come in the next years.

Imagine if the community used all the power to innovate instead of fixing a broken technology. Is like living in the IE7 age again but on a larger scale. Luckily, we don’t have to worry that much about cross browser compatibility that much. Just pick a library or framework, decide on a frontend architecture with your team (and change it a few times later when you see that things don’t work as expected), write your code in Babel, add the necessary polyfills, compile it with webpack and done… Of course don’t forget to add a css pre processor, live reload, a library for http requests, some more 5 to 10 libraries for testing…; i’m sure you have some more to add to the list.

This is not JavaScript fatigue! This is JavaScript let’s get over it already.

So let’s end here the complaining section and get to the solution. If I was running for becoming a President here is where I’d put “I gonna fix the web in 5 steps”

1. Spend 1–2 years to write a new strong typed, oop/functional language that can handle current and future needs. Make it mobile ready so we don’t have to write native apps ever again. Let’s call it LeScript.

2. Then companies will work close with the community to integrate it in the browsers and environments that need web support.

3. Keep the JavaScript engine in the browser for the next few years so they are able to run ‘legacy code’.

4. Write a compiler that coverts LeScript to JavaScript and vice versa. You will still include Javascript files for browsers that don’t support the new language but they are still in use. Also people should have a way to easily convert the current code to LeScript and be ready for the future.

5. Drop support for JavaScript when everyone is ready then delete or burn any reference to it. The next generations would thank us.

Thanks for reading. I go back to my VueJs side project for now cause Monday is ReactJS again.