DEV Community

Discussion on: The Generic Rabbit Hole of Madness

Collapse
 
jfrankcarr profile image
Frank Carr

I've never had this kind of issue with generics although I also avoid using a repository pattern as much as possible. I prefer to let the database engine do database things, like storing and querying data, and the code do code things, like calculating and such.

A lot of what you're describing seems to go back to the YAGNI principle. We can get caught up in creating an elegant set of interfaces and classes and forget what the objective of the code is supposed to be.