3 ms·
1 and 2 kind of contradict themselves (or compliment, based on how much DRY we allow)... You want to make that abstraction when you need to have a single source
by BadOakOx 2y ago
1 and 2 kind of contradict themselves (or compliment, based on how much DRY we allow)... You want to make that abstraction when you need to have a single source of truth.
Also, the argument for 2 isn't very clear, it could be interpreted like the author doesn't understand inheritance.
- jprete 2y agoYou should have one source of truth for data. But frequently multiple implementations of the same, or similar, interface don't actually have the same semantics. By merging them, you now have the same source of truth for two distinct concepts.
- eddd-ddde 2y agoThey don't really contradict. That FOO and BAR look similar, does not mean they share some "truthfulness". Prematurely reaching to deduplicate and abstract them may lead to issues when you realise they aren't actually as similar as you thought, then you end up handling edge cases that wouldn't exist if you just kept the things separate to begin with.
- AlphaSite 2y agoThe line I like to pull out is: things that look alike may not be alike.