2 ms·
> I prefer to use typedef's for opaque structs to emulate classes with all private fields, and use 'struct' for plain ol' data structures. Classes should only b
by lelanthran 3y ago
> I prefer to use typedef's for opaque structs to emulate classes with all private fields, and use 'struct' for plain ol' data structures. Classes should only be accessed via functions, while structs can be accessed directly.
Totally agree, I even wrote this as a blog post: https://www.lelanthran.com/chap9/content.html https://www.lelanthran.com/chap9/content.html