News for hackers. Stuff that matters.
Re:Porting a React Front End to TypeScript by com2kid on Tuesday April 28, 2020 @02:43AM (#23004167)
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.

Re:Porting a React Front End to TypeScript by hombre_fatal on Tuesday April 28, 2020 @03:14AM (#23004353)
Also 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.

Re:Porting a React Front End to TypeScript by SketchySeaBeast on Tuesday April 28, 2020 @10:48AM (#23007502)
Yes. 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.
Re:Porting a React Front End to TypeScript by vorpalhex on Tuesday April 28, 2020 @09:54AM (#23006962)
If you need autocomplete for your object, that's a sign your objects are probably a bit too big.