3 ms·
I'm not sure if this is obvious to the average developer and I'm late to the show, but a few years back things clicked for me when I grokked that types exist no
by Waterluvian 2y ago
I'm not sure if this is obvious to the average developer and I'm late to the show, but a few years back things clicked for me when I grokked that types exist no matter how you feel about them.
You still have to reason about the types no matter what. But writing it down empowers you to offload a lot of mental load to the computer, asking it to check your work, give you feedback as you go. It also communicates intent to other humans who read it.
One reason I like TypeScript is that there remains a, "just trust me" escape hatch when I'm testing/hacking something and don't want to "show my work" by writing out some complex type. (Funny how "show your work" is something math teachers have to fight many students to do. This feels like the same thing). But that complex type always existed. You're just saying "trust me on this." Writing it down doesn't conjure the type into existence.
Rust also clicked for me when I understood that it's really just more of the same thing: memory management, lifetimes, etc. exist no matter what. But it offers a way to show your work, formalizing intent, so that the checker/compiler can worry about the boring problems for you.
In this sense, the issue is really about making decisions on just how much "trust me on this" is appropriate.
- fellowniusmonk 2y agoMereological Nihilism demonstrates that most types are an illusion. Space, Time, Minds. Those exist. Probably :)