So, there are people out there who hold the view that compile-to-javascript languages threaten to keep the web from evolving.

"...but I also want the web as a whole to continue to grow and get better, and that only happens when we have more competent developers entering the workforce. I see compile-to-JavaScript languages as a barrier to that goal. We should be convincing more people to learn JavaScript rather than giving them more options to not write JavaScript. I often wonder what would happen if all of the teams and companies who spent time, energy, personnel, and money to develop these alternatives instead used those resources on improving JavaScript and teaching it."

I beg to differ.

I started my career programming machine language and assembly for 6502 processors. The wizardly power that came from controlling every byte that passed through the CPU, always knowing what every register contained, knowing the entire memory map of the computer and how to access it in the most efficient way was a true rush and made me feel invincible as a programmer.

However the scope of what I could do was limited by how close to the metal I was flying. Huge undertakings were not easy. Moving on to high level languages allowed forced me to give up some of that control, but in trade I was able to attempt larger, more complicated programs and finish them quicker.

Compile-to-JavaScript languages are like that. They let you apply useful abstractions like classes, interfaces, inheritance, encapsulation, and OOP design patterns. This allows you to build larger systems in a more maintainable way, that is more team-friendly.

Try to find a decent assembly language programmer who really knows their stuff. You're going to pay a fortune for them, because its hard and takes a lot of work to achieve mastery. And chances are no mere mortals are going to understand how to maintain their code, so you'll use it only when needed and use higher level languages like C and C++ for the bulk of your application.

Same goes for JavaScript. The barrier to entry is low - open up notepad and a browser and anyone can do it, so the field is full of people who sling it, but the masters are few and far between. That's because it's hard to achieve mastery level JS and in order to do anything significant, you have to be way to damned clever for other people to maintain your code.

Meanwhile in a parallel universe, Object Oriented Programming has design patterns and concepts that a novice can follow and quickly become proficient in developing maintainable code that break a problem into actors with well-defined roles, responsibilities, and collaborations.

Back in the browser, JavaScript Is a bunch of functions and variables in a big global gumbo called window.

TypeScript and Dart allow OOP developers who already have training on how to write maintainable code to apply those skills to the lawless west of the browser.

#javascript #dartlang #typescript  
Thoughts on TypeScript by JS Guru, Nicholas C. Zakas
Shared publiclyView activity