You don’t even need any new constructs if you’re going to give it a name anyway.
object a extends A { ... }
The problem is that new A {...}
is an expression—which makes is more versatile—whereas object a extends A {...}
isn’t.
You don’t even need any new constructs if you’re going to give it a name anyway.
object a extends A { ... }
The problem is that new A {...}
is an expression—which makes is more versatile—whereas object a extends A {...}
isn’t.