Consider a class School. If we were to add a Pupil field to the school class is it possible to implicity pass a reference to the School object into the Pupil object.
So rather than doing
class School() {
val pupil:Pupil = new Pupil(this)
}
We could do this
class School() {
val pupil:Pupil = new Pupil()
}
And would still be able to access the school reference from the pupil object. I'm thinking scala implicits might help?