3 ms·
Interesting. I love the notion of specifying (implicitly or explicitly) your level of confidence in code or model. That said, I find my experience differs aro
by dllthomas 11y ago
Interesting. I love the notion of specifying (implicitly or explicitly) your level of confidence in code or model.
That said, I find my experience differs around the following:
"[W]hen I start on a problem, especially a problem I've never dealt with before, I don't want to specify a contract because I consider myself too ignorant to specify a contract."
I find that's precisely when I find types the most valuable. I can start to sketch out the properties that I think should hold, and the type checker helps me think ahead and catch inconsistencies before I've coded all the way to them.
It also helps me write not-quite-right code at the outset with confidence, knowing that as I discover that I'm wrong about things I will have assistance in finding where I am wrong about things, and hopefully more quickly get to sufficiently right and sufficiently complete code.
I recognize that much of this is subjective, may well not apply to everyone, and might even be wrong (it's a hard thing to measure)... but I thought I'd share my POV.