DEV Community

Discussion on: Why so much hype over Typescript ?

 
jwp profile image
John Peters • Edited

"Complexity and lock-in?" How can this possibly be true when Typescript can run in JavaScript only mode.

On lost time: I can't tell you how much time I've lost on poor javascript practices, e.g. the worst being declaring the same object in multiple places with keyname spelling errors, with values not expected like numeric over string. Most of all almost all javascript code I have maintained in the past (written by other people) was the most convoluted monolithic code I have ever seen. No separation of concerns, nothing DRY, no SOLID principals. The interesting thing is that I can get into the minds of what they were thinking when they created it. I can't tell you how undisciplined most are... Monolithic code is technical debt in a major way from day one.

BTW software studies all show that up to 80% of all software cost is in maintenance and often done by people who've never seen the code before. You can't possibly be factoring in the cost of maintaining monolithic Javascript code. It's the stuff Migrations to new Architecture is required, you know like the AngularJS rewrite which blew everyone out of the water. When software architecture is abandoned the cost to recoup is in the billions.

From code bases I've seen, most Javascript only people haven't a clue on good architectural practices, its code-and-go as fast as possible. Who cares about software principals, the simple most being DRY.

One other note, if Typescript is so costly why did Google adopt it saying it's a much better model for Organize Modules on large projects. This translates to easier to maintain.