Why are the curly braces required for a minimal Record declaration?

Swaranga Sarma sarma.swaranga at gmail.com
Sat Apr 25 20:39:55 UTC 2020


Records is a new feature and does not carry the same baggage as classes do.
Looking at a minimal Record Point declaration:

record Point(int x, int y) {}

Every part of this declaration makes sense to me expect the curly braces
'{}'. Why is that required if I do no intend do override any part of the
record?

I am probably missing something; appreciate the insight.

-Swaranga


More information about the amber-dev mailing list