Is there any relationship between this aliasing
and self type
?
Is this aliasing
a special case of self type
?
In programming in scala 2nd P776, the author said:
abstract class Parser[+T] extends ... { p =>
You saw syntax like this in Section 29.4, where it was used to give a self type to a trait.
but, the syntax for self type doesn't look like this, it's like:
this:SomeAssumedType =>
And another question is why this aliasing
is useful? I can't see there's any sense to give this
reference an alias, because it's already a conventional alias for the current object reference, however in the Play framework source code, I saw lots of codes (especially, the anorm part) like:
trait RowParser[+A] extends (Row => SqlResult[A]) {
parent =>
Why does this make sense?