> De: "Guy Steele" <[email protected]>
> À: "Kevin Bourrillion" <[email protected]>
> Cc: "Remi Forax" <[email protected]>, "amber-spec-experts"
> <[email protected]>
> Envoyé: Vendredi 12 Avril 2019 20:43:12
> Objet: Re: records are dead long live to ...

>> On Apr 12, 2019, at 2:17 PM, Kevin Bourrillion < [ mailto:[email protected] |
>> [email protected] ] > wrote:

>> On Fri, Apr 12, 2019 at 12:34 AM Remi Forax < [ mailto:[email protected] |
>> [email protected] ] > 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`.

Apart from the fact that records are now immutable. 

I had no issue with the previous incarnation of record to be named record, it 
was even a great name, record is the Pascal equivalent of the C struct, i've 
seen it as a kind of homage given that i believe the only other thing that Java 
has from Pascal is its method calling convention. 

Rémi 

Reply via email to