3 ms·
Not having to go to the code and investigate what the types of am object's fields are. That alone can make TS worth it. Heck just getting auto-complete on an o
by com2kid 7y ago
Not having to go to the code and investigate what the types of am object's fields are. That alone can make TS worth it.
Heck just getting auto-complete on an object's members.
- hombre_fatal 7y agoAlso any sort of combinator usage or functional programming reminds me of why static typing is so useful. A few layers of higher order functions / combinators and I don't remember if I have `value` or a `{ value: value }` container (like map vs flatMap). Or which stage of the curry I'm at. Oh right, I'm at foo(a, _, c) but thought I was at foo(a, b, _). If you can't even remember the last time you've encountered a runtime error, you are by my definition writing trivial code or not writing much code at all.
- vorpalhex 7y agoIf you need autocomplete for your object, that's a sign your objects are probably a bit too big.
- SketchySeaBeast 7y agoYes. I'm part of a long term support team - teams do their work and transition it to me. I support a lot of solutions at once, none of which I've built or been able to spend a significant time getting into the guts of. Having the code do a lot of the investigation for me is incredibly valuable. It helps me quickly build a mental model of the small slice of the code I'm dealing with.