Settings

Theme

Thou Shalt Not Use Struct

medium.com

4 points by fastier 10 years ago · 1 comment

Reader

sparkie 10 years ago

Title should really be: Thou shalt not use a struct whose members are defined in a header file.

Because the rest of the post drags on about encapsulation with the implicit assumption that use of private and public in classes is the only way to acheive it. What makes this assumption awkward is that the C++ class style actively encourages certain kinds of coupling which the article is crusading against, and the best means of encapsulation we have: using only opaque types in header files, is omitted.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection