4 ms·
How would I use contravariants to improve the architecture of some code? I geek out on articles like this, but I frequently struggle to see where I would actua
by theschwa 6y ago
How would I use contravariants to improve the architecture of some code?
I geek out on articles like this, but I frequently struggle to see where I would actually apply it.
- DanielMcLaury 6y agoI think in a lot of cases this is sort of like asking "how can I use an abstract factory to improve my COBOL code?" Like, if your code isn't already written in terms of classes, you probably can't just jump in and use OOP design patterns to do anything. Similarly, you may need to start from a reasonably functional codebase to apply most functional programming concepts.