News for hackers. Stuff that matters.
Re:Open-sourcing Sorbet: a fast, powerful type checker for Ruby by apsdsm on Thursday June 20, 2019 @07:40PM (#20238559)
Yes and no. It’s true that cleverly written tests encompass bad input, but this also means you need to add an additional layer to your test thinking, which depending on who is writing those tests might might yield results of varying quality... Or you could try fuzzing?
Re:Open-sourcing Sorbet: a fast, powerful type checker for Ruby by dragonwriter on Friday June 21, 2019 @04:57AM (#20240963)
> It’s true that cleverly written tests encompass bad input, but this also means you need to add an additional layer to your test thinking

Sure, you have to deal with more cases in running code if they aren't foreclosed by static guarantees, but you are either adding the thinking to code static guarantees and you are doing the thinking to code tests, and I've seen overpermissive types from too-shallow thought on that (even when it's not due to insufficient expressiveness in the type system) plenty of times to not think its substantially less of a risk than inadequate testing.

I'm not against static typing; I definitely think it has an important place in the toolbox, butnmy experience doesn't align with the idea that static typing is universally better for rapid prototyping.

Re:Open-sourcing Sorbet: a fast, powerful type checker for Ruby by dnautics on Friday June 21, 2019 @01:25PM (#20244569)
fuzzing is kind of crude, you should go for a more sophisticated type of test, like property testing, which is "fuzzing" plus "shrinking"