In my article, I explained what a web developer could do. On the front end, he could use a transpiled language (there are many to choose from). On the back end, he could use any of the standard languages (Java, Python, C#, PHP, Ruby, Perl, Scala, etc.).

I also explained that you can’t avoid JavaScript completely. The main point is that you can use JavaScript minimally. More than 98% of your code can be written in a better and safer language.

You mentioned Babel. What I’m trying to tell you is that you can use JavaScript as a kind of “assembly language” for the web. When you program in C++ or Go, are you using assembly language (since these languages compile down to assembly language)? Of course not. Same thing with a transpiled language.

Yes, it is possible to teach best practices. But why bother? If you can use better programming languages, why would you accede to JavaScript?

Best practices place an additional cognitive burden on the programmer. And as I indicated in my article, they are error-prone. Linters are imperfect. Programmers are imperfect; they can still slip up.

The message I’m trying to hammer home again and again is that JavaScript is a dangerous language to use. If you have the choice (and you do), you can use safer languages. Why wouldn’t you?

What is the big attraction about JavaScript? Please explain. If you can offer a cogent explanation, then I will stop my anti-JS campaign.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store