News for hackers. Stuff that matters.
Re:Dunning-Kruger and other memes (2015) by dragonwriter on Tuesday June 28, 2016 @12:42PM (#11995240)
> I can't think of any code I've personally written in, say, the past five years which used tests or runtime type checks to try to catch type-related bugs.

All bugs are type-related, with a sufficiently advanced type system.

Re:Dunning-Kruger and other memes (2015) by ubernostrum on Tuesday June 28, 2016 @03:12PM (#11996612)
Sure, with certain type systems you can write an "add" function and describe its type such that you can verify it really does return the sum of its arguments.

But all you've really accomplished is to move the potential bug to a different layer; before it was possible to write incorrect logic in the function and have a bug, now it's possible to write an incorrect type specification and have a bug. So now you need a type system to let you describe the behavior of your type system (and it has to be a separate thing from the type system). And then you're back where you started, just now with an extra layer of architecture.