Should programmers prefer making wide libraries or thin libraries?
- by Telastyn
For classes and functions, it is clear cut: each should do only one thing.
For libraries though, this is less clear. If you have a library with collections, it might have multiple collections. It might have useful functions like sorting, which aren't strictly collection based but users would expect. Each of these results in a 'wider' library.
On the other side is having a library for the specific collection type and/or with little built-in functionality. If you want a queue, it gives you a queue. If you want to sort that list, then the library lets you do that yourself.
What is the best practice here (if any)? I can see arguments for each side.