<<< More access control examples | Index | OOP Philosophy Notes >>> |
Default access control is:
public for structs;
private for classes.
Common practice is to:
Tag access control by public and private labels in classes.
Use structs as if we were programming in C:
Forget private: everything is public by default
No functions allowed.
If you your struct needs a function, it should probably become a class.
<<< More access control examples | Index | OOP Philosophy Notes >>> |