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
You have 88 fingers ? Cool !
I normally explain to piano players that a guitar is the equivalent of reaching into the piano and bending the strings, adding vibrato, adding slides, and so on. Not to mention portability, moving about on stage, using a capo, and changing the tunings.