When reading some articles about Scala, I found some examples with a curious syntax, which I might understand incorrectly
class Child[C <: Child[C]] {
some_name : C => // here, what does it mean?
var roomie : Option[C] = None
def roomWith(aChild : C)= {
roomie = Some(aChild)
aChild.roomie = Some(this)
}
}
class Boy extends Child[Boy]
I found similar examples with traits.
Does it mean that I declare this
object in a class scope to by type of C
?