by pkolaczk · 3y ago · 0 comments
> What are these special open-ended items? How do you need to extend comparison to account for them?
The whole point of abstraction is to make those decisions once and isolate the complexity in one place instead of having it spread over N places in the code, forcing everybody to solve the same problems again and again.
I would think of the range itself as the abstraction, and then it matters less how it's implemented since any potential problems are local to the implementation and cheap-ish to fix.
The point Sandi Metz is making is that it's often only obvious when you can do this in hindsight.
Lots of things can look abstractions worthy but aren't - including things that are repeated 3 or even 10 times.