There are a few other cases where you might prefer companion objects.
-
If you want multiple classes in one file, and you want the constant private to a single class.
-
If you want the same constants with different values in multiple related classes. In that case you can have the companion objects implement a common interface, to clearly signal the pattern and help you be consistent in later refactoring.