(no title)
adpatersbad | 2 months ago
The best assumption to start with is that adapters are bad by default, because they are an unnecessary layer to maintain (and potentially a point of failure and bottleneck depending on what they are and do). Then, make the argument for the adapter as a guilty until proven innocent case.
If you can make a solid case for it, fine. There are many solid cases for adapters, e.g. drivers for a database or hardware.
Never write an adapter that you can handle more scalably, flexibly, and almost as easily by calling something directly.
ka_veli|2 months ago
dpark|2 months ago
Certainly you should not wrap a library “just because”. The benefit of doing so should be easy to articulate.