News for hackers. Stuff that matters.
Re:Porting a React Front End to TypeScript by winter_blue on Tuesday April 28, 2020 @02:47AM (#23004183)
Tests are a very poor and verbose duct-tapey replacement for succinct and powerful static type information.

Static types massively make it easier to understand new code. I can actually see the structure of the data that's getting passed around, with types.

Re:Porting a React Front End to TypeScript by joelbluminator on Tuesday April 28, 2020 @03:13AM (#23004345)
Huh? tests are there to make sure your code behaves correctly, e.g it works. Don't you do that in static land?
Re:Porting a React Front End to TypeScript by winter_blue on Tuesday April 28, 2020 @04:07AM (#23004745)
You write tests for things that actually matter ... like you know, testing functionality.

You don't waste time writing tests that simply check if all the arguments received the right type. This is taken care of by the type checker.

Besides, the biggest benefit of types is readability.

Re:Porting a React Front End to TypeScript by joelbluminator on Tuesday April 28, 2020 @05:09AM (#23005139)
I don't see tests as you describe in dynamic languages much. E.G this is how you would test Rails controllers https://gitlab.com/gitlab-org/gitlab/-/blob/master/spec/cont... . I don't think its that different than java world.