3 ms·
> If you're not used to it, it looks like you've over-engineered and ended up with Generics soup Yes, it looks exactly like that. You’ve built not just an int
by dpark 4mo ago
> If you're not used to it, it looks like you've over-engineered and ended up with Generics soup
Yes, it looks exactly like that. You’ve built not just an interface for UserStore you probably didn’t need, but a generalized Store abstraction that you definitely didn’t need.
> but paradoxically, you're committing yourself the least to any concrete implementation
This isn’t paradoxical at all. You’ve avoided committing yourself to a concrete implementation by implementing layers of goop you don’t need and likely never will. And because you did all this abstraction without real needs to ground it, you almost certainly did it wrong even if you do eventually need it.
You are gonna need a user store, so you should have built that first.
- tpoacher 3mo agoThen again, this goes completely against the "O" in the SOLID principles (and possibly also the "D" too). Personally I prefer SOLID to YAGNI.
- deleted 4mo ago[deleted]