From SOLID principles, your code should be open to extension, and closed to modification. As Uncle Bob points out, classes protect us from new types, while data structures protect us from new functions. This means that when you suspect new functions may be required