is there a formatting convention for where to put ...
# announcements
l
is there a formatting convention for where to put the companion object inside a class?
l
Generally, the contents of a class is sorted in the following order:
- Property declarations and initializer blocks
- Secondary constructors
- Method declarations
- Companion object
what about nested classes?
🤷 1
Put nested classes next to the code that uses those classes. If the classes are intended to be used externally and aren't referenced inside the class, put them in the end, after the companion object.
...I should have read the whole thing
😁 2