What's the best practice? When do you create classes and when do you use top level functions?
c
Czar
08/10/2018, 1:13 PM
it's a game of balance, you'll have to decide for yourself, what looks/works best for any specific situation.
My rule of thumb is: if there is no state, use a top level function. If it only makes sense for one class, put it into companion object.