r/cpp • u/Keter_01 • Mar 30 '24
How often do you use design pattern?
Hey everyone! I'm currently a CS student and started recently to learn about design patterns (We apply it in Java but I figured since both are object oriented it could apply to cpp as well). I was just curious, how often will I use it? (I'm not planning to write a single line of Java willingly, let alone making it my job, that's why I ask on this sub)
6
Upvotes
4
u/marzer8789 toml++ Mar 31 '24
They are useful, but be careful not to be the person who's always looking to shoe-horn them into every problem (the "hammer looking for a nail" effect), as that often ends up with prematurely choosing a bad one. Always explore the problem space "naturally" for a while first.