News for hackers. Stuff that matters.
Re:Yarn's Future – v2 and beyond by lucisferre on Thursday January 24, 2019 @12:22PM (#18990669)
They are a compile time contract at best, they are nothing like a test.
Re:Yarn's Future – v2 and beyond by coldtea on Thursday January 24, 2019 @12:54PM (#18991036)
Test and compile time contracts both check invariants.

Abstractly speaking, there's no big conceptual chasm that separates a test in a test suite from a test the compiler makes.

Re:Yarn's Future – v2 and beyond by mort96 on Thursday January 24, 2019 @12:27PM (#18990745)
A lot of tests end up testing things which would've been caught by the type system. Static and strong typing doesn't make tests in general unnecessary, but it does mean you don't need quite so many trivial tests.
Re:Yarn's Future – v2 and beyond by Sammi on Thursday January 24, 2019 @12:36PM (#18990842)
Half the tests I write for Javascript code are type tests. Typescript does that much better.
Re:Yarn's Future – v2 and beyond by azangru on Thursday January 24, 2019 @12:29PM (#18990772)
They are checking the shape of inputs and outputs, making it unnecessary to test that a function returns a value of a particular type or that this value has particular fields. They make sure you don't make stupid mistakes, leaving it up to you to test really valuable bits of logic.