Hacker News new | ask | show | jobs
by chaostheory 2559 days ago
If we were talking about Ruby or Python, you'd have a stronger point. However Typescript's benefits far outweigh its drawbacks in light of Javascript's excessive lenience. Since, you're complaining about types, have you made good use of Typescript's interfaces and class inheritance? They're pretty powerful and even more flexible than something like Java.
1 comments

Yes, I use TypeScript types very idiomatically and have received very positive feedback on my TypeScript code. But just running `tsc` takes >10 seconds on a relatively small project, and IDE support is becoming proportionately slow, e.g. hovering over anything to show its type often takes 5-10 seconds before VS Code will actually have something to show me. It's becoming painful, and that feature which I once heavily relied on has become nearly useless to me.
Is the time spent compiling drastically more than the time spent debugging code because of the lack of types? A few seconds of compiling is because than the potential hours wasted on debugging. Besides, you can mitigate compile times by getting a faster computer. Silicon time is still way cheaper than carbon time.
It's not just "seconds wasted in compiling". It's having my IDE say "thinking..." for 3-10 seconds every time I want to see what type something is. Or having create-react-app load for 5-15 seconds, every time I save any file before letting my browser update (even if I press refresh manually), because it's compiling. And when this happens on a minute-by-minute basis, it drastically slows down development time.