For the convenience of my users, I'd like to design an interface like the following:
class MyApplication {
def help = "usage..."
object help {
def topics : List[String] = List( ... )
}
}
But of course, the collision of the function and the object called help make this impossible.
Is there any way to do this in Scala? eg, Have one behaviour if the user calls help with nothing following, and another behaviour if they call help.topics?
(If not, what is the idiomatic Scala way to do something similar?)