3 ms·
Interestingly, this is OOP advice that if generalized, applies pretty directly to functional programming. In my mind the fundamental problem with using primitiv
by aranchelk 5y ago
Interestingly, this is OOP advice that if generalized, applies pretty directly to functional programming. In my mind the fundamental problem with using primitives is you’re overloading the meaning of existing types, you can use them in the wrong places and the type checker of course can’t catch those misuses. You’re stuck with functions/methods that may be applied even if they don’t make sense.
This is very much analogous to failure to use newtype wrappers in Haskell-like languages to differentiate distinct uses of existing types. Same symptoms, same underlying conceptual issue.