10 ms·
Types help eliminate an entire class of unit tests one would need to write before refactoring. Things like newtype also allow enforcing certain constraints whil
by nsm 8y ago
Types help eliminate an entire class of unit tests one would need to write before refactoring. Things like newtype also allow enforcing certain constraints while refactoring. So yes, while the end goal is the same, the process is simplified.
- josteink 8y agoI’m not against types. In fact I mostly prefer typed languages. I’m just stating that there is nothing fundamental about code-refactoring which ties it exclusively to the domain of typed programming-languages, something I consider fairly self-evident. I mean obviously one can refactor terrible code in any language to help improve its structure right? That this remark would cause such sub-thread defending types in general (I never said they didn’t have value) has me honestly quite surprised.