4 ms·
FWIW, structs and classes are largely identical in C++ , with the exception of public/private defaults. So using one over the other doesn’t really change anyth
by dagmx 4y ago
FWIW, structs and classes are largely identical in C++ , with the exception of public/private defaults.
So using one over the other doesn’t really change anything with regards to data oriented design.
- gavinray 4y agoAye, as opposed to D where structs are value types and classes are reference types It's just a small annoyance to have to put "public:" at the top of every data-class definition So I use structs everywhere but you're completely right, no real difference
- dagmx 4y agoYeah I do the same as you since I write a ton of Swift (which does the same delineation as D). It’s mostly just a mental marker for myself that I want to treat one as a value type.