Do you think that using TypeScript is too heavy, unnecessary as it takes JavaScript in the wrong direction (like Angular 2)? If you look at the recent developments in JavaScript, especially ES6 there is no need to use TypeScript.
I would like to know what you guys think!
If you are doing serious development - you need TypeScript.
Simply having its definitions installed often leads to discovering a 3rd or 4th parameter in a function from a lib you thought you knew. It saves you from having to memorize the long tale 80% configuration properties on a widget. And that's not even talking about your project code.
TypeScript gives you code analysis and definitive search capabilities for your codebase. Refactoring pure JS is a nightmare. You never seem to have enough UTs to make sure nothing brakes, not to mention the time it takes to fix them when a change is actually in order. The time needed to introduce each change growth exponentially, and you end up with read only code. TS, on the other hand, gives you all the benefits of Java / C# refactoring routines with non of the headaches.
And no, TS is not overkill, because TS is just ECMA6 + as much extra features as you want to use. How do you convert JS file to TS? You rename it. That's it. Every feature is optional. I've seen teams of JS devs using it just for the namespace 'module' syntax.
Dart looks good. But it is not JavaScript. And it is Google, a major corp with a board of directors and shareholders. To me, it is just a slightly better GWT/ Flash / Silverlight, and those are all dead.
Кошелев Иван
Jan Vladimir Mostert
Idea Incubator
Having a type-based system in JavaScript is essential if you want to build enormous projects. If you've ever written more than 100000+ lines of javascript for a project, you'll realise how quickly JavaScript becomes messy and how difficult it can be to find a bug. It's even worse if you didn't write that 100000+ lines of JavaScript and have to debug somebody else's JavaScript.
If you compare it with the ease of debugging in a Java project for example, you'll understand why enterprise in general is hesitant to use JavaScript for large projects. TypeScript is definitely a step in the right direction, ES6 even more so if we want to start building true abstract components that can be re-used. If it makes JavaScript a more sustainable eco-system to use in the enterprise, everyone wins.
Also, IDEs do much better understanding your code if there's a type-based system which gives you much better tools to do push-in refactoring, renaming things, giving you hints about variables that aren't being used or using variables that doesn't exist or when you assign values to variables that shouldn't be taking that value, etc.
Personally I prefer Dart's optional type system, it feels much more powerful than TypeScript and if you want to ditch the types to get a prototype out quicker, then you can do that without having to declare the type as any.