records are dead long live to ...

Guy Steele guy.steele at oracle.com
Fri Apr 12 18:43:12 UTC 2019


> On Apr 12, 2019, at 2:17 PM, Kevin Bourrillion <kevinb at google.com> wrote:
> 
> On Fri, Apr 12, 2019 at 12:34 AM Remi Forax <forax at univ-mlv.fr <mailto:forax at univ-mlv.fr>> wrote:
> 
> At the end of section "Why not "just" do tuples ?", you have this gem,
> "A good starting point for thinking about records is that they are nominal tuples."
> 
> That is *a* starting point, but I think a barely useful one. Records have semantics, which makes them *worlds* different from tuples. Methods, supertypes, validation, specification... I think it's fair to say that all a record holds is a "tuple", but it's so much more. Record is to tuple as enum is to int.

Good observation.  And also note that Java `record` is to C `struct` as Java `enum` is to C `enum`.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20190412/faaf1063/attachment-0001.html>


More information about the amber-spec-experts mailing list