What's the best practice? When do you create class...
# announcements
p
What's the best practice? When do you create classes and when do you use top level functions?
c
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.
r
Classes and top level functions are two different things