Suppose I have a trait
in Scala
trait Connection {
def init(name: String)
def dispose
}
And I want to create a class which implements it. But I want to name it as Connection
also:
class Connection extends Connection {
// ....
}
It's not going to work. Of course, I could name trait
something differently, but it turned out that the naming convention in Scala says that I should name trait as ordinary classes, meaning without any prefix, which I would use in C# (IConnection
where IConnection
would be the interface
).
And in this particular case the name of Connection
for the class
and the trait
is more suitable.
Or did I miss something in Scala's naming convention?