Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
lelanthran
on Oct 9, 2023
|
parent
|
context
|
favorite
| on:
My personal C coding style as of late 2023
> 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:
Totally agree, I even wrote this as a blog post: https://www.lelanthran.com/chap9/content.html