Records: supertype?

Brian Goetz brian.goetz at oracle.com
Tue Jun 11 21:51:54 UTC 2019



> Of course, `AbstractRecord` is wide open. The main problem I see with 
> that name is that it will be weird if we end up allowing users to 
> write their own abstract records.

Which may well happen someday.  (Which also makes giving Record an 
F-bounded type parameter a little more dodgy.)

> (It's /slightly/ weird to have it named "*Record" when it /is not a 
> record/ but it's already the case that Enum is not an enum, so <meh>.)
>
> I guess I would lean toward just using the straightforward name `Record`.

Yeah, that seems the most straightforward choice.  Along with the same 
rule we have for Enum, where it cannot be extended by ordinary classes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20190611/7da57d1d/attachment-0001.html>


More information about the amber-spec-experts mailing list