Might it be planned to make the `{ }` optional whe...
# announcements
d
Might it be planned to make the
{ }
optional when writing a anonymous class?
Copy code
object  : xyz(...) {   }
Seems like a minor inconsistency since they are optional with 'normal' classes
g
Probably make sense to create an issue
d
But what is the point of
object : xyz(...) {}
vs.
xyz(...)
Only difference is when you use reflection
d
xyz could be abstract for example
g
abstract class without abstract methods? For sure it’s possible, but probably not a most common case
d
There's a good reason for them to be optional with normal classes, not with anonymous ones.
A reason for them not to be optional with anonymous class is that if you don't override something, you probably didn't intend for there to be an anonymous class