Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: