Hacker News new | ask | show | jobs
by jondubois 2096 days ago
Type hype is real. It almost seems like job-creation propaganda at this stage.

When I judge things, I look at practical outcomes; and the fact is that I produce better software with more features within the same timeframe if I use JavaScript rather than TypeScript and the product in both cases is equally robust. This has been true for me both independently and as part of a team.

With JS, I can write more code and more tests within the same amount of time and there is no drop in quality.

I'm very surprised that nobody else seems to be experiencing the same thing. I've been back and forth many times between the two paradigms and for me it's clear as day.

3 comments

Sorry anecdata isn't data. You might be able to write more code in terms of LOC but you're also writing tests that a strongly typed system wouldn't need.

You don't know that your code is "equally robust". You don't know what sort of "drop in quality" you have because you're not using strong types.

You are making a judgement that isn't backed by anything other than intuition.

I switched my Javascript code base to Typescript a few months ago. There is a productivity cost that is declining over time as I get more used to Typescript. But the conversion also flushed out some significant bugs in the JavaScript base.

And I only get to work on this code once a week. So when I come back to it I’ve found it’s much clearer how it works and I get productive much faster.

I will bet any coworkers who have to work on your code wish it was in Typescript.

This doesn't conform with any of my experiences in non-trivial JS codebases. Migrating to TS tends to reveal previously overlooked implicit typing issues. Also, I find the "upfront productivity loss" of TS to be overstated: adding in annotations here and there doesn't take much time at all, and pays dividends quickly. Many hours have been lost tracking down some elusive runtime bug stemming from a typo in a vanilla JS property access.