4 ms·
Reading through this list reminded me why I actually don’t want to use TS in the first place. I think we need to have a discussion about the benefits of dynami
by react_burger38 6y ago
Reading through this list reminded me why I actually don’t want to use TS in the first place.
I think we need to have a discussion about the benefits of dynamically typed languages and why many people purposely choose them over statically typed ones.
In my experience, 95% of the time TS would not have helped anything. And the other 5% where it would have is not worth the constant work required to type the whole application. And sure you can use ts just a little bit... but everyone knows that organizationally the pressure then begins to use TS for the whole app.
Types are nice in some circumstances but are they really worth it? I feel like the answer is no for the majority of applications.
- roberttod 6y agoI totally agree. I thought typescript might grow on me as I got to grips with it, but alas a year of using it and it's still slowing me down a lot for how much it's helping. Also "don't use 'any'" - there are a lot of edge cases where this can be very difficult to avoid. Even the TS experts have failed to help me figure out how to remove some "any"s. I'm sure there is a correct way, but it just shouldn't be that difficult.
- bdefore 6y agoWhen enforced like a code coverage score I agree. If in your day-to-day there's static checking against any/unknown, well, that's effectively saying 'only type-checked code welcome'. Which is kind of sad and against the origins of TS, which meant to supplement JS without bringing all that uncool into the school. Sometimes I dig into source of a supposedly JS library and witness the author not just the type-checking, but OOPy interfaces, private/public, and I again feel the itch that this superset is a more refined embrace, extend, and extinguish.
- richeyryan 6y agoI'm kind of resigned to it. There's places where I imagine I'll end up using it and others where I'll do without. Someone who talks intelligently about the strengths of dynamic languages is Rich Hickey. His talks challenge some of the ideas where static typing is superior to dynamic typing. He is arguably biased in his position but it makes for a refreshing contrast to the static types argument. Clojure is a great example of the qualities required to make dynamic typing really powerful, the main one being the large library of functions that can operate over all collections. This reduces the amount of custom code you write for data munging, reducing surface area for bugs. The complete counterpoint to that is Go with no utilities for doing common data transformations, forcing users to re-implement similar logic repeatedly. It may as well be statically typed at that stage to avoid mistakes from writing the same code over and over. The more powerful statically typed languages with generics then fall somewhere in the middle where you don't have to repeat yourself as much.
- mercurysmessage 6y agoI disagree. I really don't find Typescript hard to use at all, and I've preferred the security and well defined variables and functions that Typescript provides. I would use TS over JS any day.