A typesystem is also much better than me at figuring out what could go wrong with some code. I used to be better at spotting mistakes and writing dynamic code, but ever since I started relying on typesystems I think I got a little worse at it. At least I definitely don't have as much patience dealing with dynamic code anymore.
Maybe typesystems negatively impacted my ability to reason about dynamic code? (I'm actually a bit torn on this)
> Maybe typesystems negatively impacted my ability to reason about dynamic code?
I think type systems definitely make your brain less paranoid about doing all the manual checking that you'd need to do with dynamic code. Whether that's a net positive / negative depends on the overall results: Can / will the mental effort you would have spent being paranoid about dynamic code be usefully spent somewhere else? Are there other side benefits to the effort you have to make with dynamic code that you're losing when you used a type system? Are you less thorough about testing, for instance? Does keeping the entire system in your head mean you are more aware of the overall architecture? Does it help encourage you to keep the architecture simple? Or does the that fact that you have to keep it simple limit the possibilities?
Exactly, so when replacing type systems with GPS, dynamic code with manual navigation, testing with checking if you're on the right track and architecture with city/land this becomes interesting.
In programming I prefer the most sound route to get to my destination. I think typesystems greatly help me with that by giving me warnings and errors when I take the wrong path.
In real life I usually only prefer to get to a destination so I use the GPS as I know it can get the fastest route better than me most of the time.
If I want to explore a city to find interesting places I don't use a GPS and resort to walking around. When I found an interesting place I will mark it down in google maps and maybe use a GPS next time I go there.
If I want to explore an idea with programming the code I write tends to be less sound and more dynamic, when I know what I want I'd refactor the code to be more sound and less dynamic.
Dynamic typing makes it too easy to be clever. Which is usually bad all things considered. It makes code harder to understand, and when you want to extend it, or integrate it somewhere else, there might be tons of footguns. In short, unless extraordinary discipline is maintained, dynamic code can quickly turn into legacy code.
Maybe typesystems negatively impacted my ability to reason about dynamic code? (I'm actually a bit torn on this)