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

everything is public in a struct is great, otherwise sane debug printing would be impossible. there are other languages where nothing is private and operability (debugging on the fly when shit is falling down around you in prod) is unparalleled.


Rust has sane debug printing and doesn’t have to allow everything to be public. Opaque types are a thing in C for these reasons. You don’t want users of your code to depend on how it works internally.




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

Search: