No comments
We use proper variable names instead of comments. The only exceptions for comments are "//TODO" temporary labels.
Order of class members in within the class definition
Internet suggests multiple ways for ordering and sorting members, and I follow neither of them. It is up to everybody to choose his/her own way of sorting members. It is not important how we sort members; rather it is important how consistently we follow our chosen methodology. So my way to sort members is as follows:
- Inherited (overridden) members from the parent class.
- Everything else.
In within of each of these, items are sorted as follows:
- Variables
- Init{} block
- Constructors(){}
- Functions(){}
- Everything else
In within of each of these, items are sorted as follows:
- Abstract
- Public
- Private
- Everything else
No comments:
Post a Comment