r/AskProgramming • u/R3cl41m3r • May 25 '26
Combining OOP and structs-of-arrays?
I'm used to doing things with structs-of-arrays because they're easy to implement and work with. I never really bothered to learn OOP, because it didn't seem to offer much beyond modelling code on our misguided intuitions about how the world works.
I'm currently learning about and reevaluating OOP for reasons, which makes me wonder: is OOP compatible with structs-of-arrays, or am I missing something important?
0
Upvotes
View all comments
Show parent comment
2
u/Paul_Pedant May 25 '26
IIRC, Jerry Lee Lewis used his butt, and his feet, at various times. Given that his big hit was "Great Balls of Fire", I prefer not to expand on this any further.
I recall this from somewhere: "To a person whose only tool is a hammer, every problem looks like a nail."