Re: Updated Draft specs for JEP 359 (Records)

2019-12-03 Thread Tagir Valeev
Looks good to me, thanks. вт, 3 дек. 2019 г., 20:00 Gavin Bierman : > I have made a further change to the online version. > > There was a missing case in 8.10.3, as it should be required that an > explicitly declared accessor method is not static. > > Gavin > > gbierman$ hg diff -c 30704:012cc50c

Re: Updated Draft specs for JEP 359 (Records)

2019-12-03 Thread Maurizio Cimadamore
+1 Maurizio On 03/12/2019 13:00, Gavin Bierman wrote: I have made a further change to the online version. There was a missing case in 8.10.3, as it should be required that an explicitly declared accessor method is not static. Gavin gbierman$ hg diff -c 30704:012cc50cb363 diff -r 9f5a2133411

Re: Updated Draft specs for JEP 359 (Records)

2019-12-03 Thread Gavin Bierman
I have made a further change to the online version. There was a missing case in 8.10.3, as it should be required that an explicitly declared accessor method is not static. Gavin gbierman$ hg diff -c 30704:012cc50cb363 diff -r 9f5a21334115 -r 012cc50cb363 closed/src/java.se/share/specs/records

Re: Updated Draft specs for JEP 359 (Records)

2019-11-27 Thread Alex Buckley
On 11/27/2019 12:59 AM, Gavin Bierman wrote: I don't see any changes to http://cr.openjdk.java.net/~gbierman/jep359/jep359-20191125/specs/records-jvms.html ? Should be there now. This updated JVMS draft looks good, thanks. Alex

Re: Updated Draft specs for JEP 359 (Records)

2019-11-27 Thread Gavin Bierman
> On 26 Nov 2019, at 19:28, Alex Buckley wrote: > > > On 11/26/2019 8:48 AM, Dan Smith wrote: >> Here's my slightly-tweaked version of this note: >>> It is a limitation of the `class` file that, while a method parameter or a >>> module may be marked `ACC_MANDATED` ([4.7.24], [4.7.25]), there

Re: Updated Draft specs for JEP 359 (Records)

2019-11-26 Thread Alex Buckley
On 11/26/2019 8:48 AM, Dan Smith wrote: Here's my slightly-tweaked version of this note: It is a limitation of the `class` file that, while a method parameter or a module may be marked `ACC_MANDATED` ([4.7.24], [4.7.25]), there is no equivalent way to flag compiler-generated methods and field

Re: Updated Draft specs for JEP 359 (Records)

2019-11-26 Thread Alex Buckley
Updated JLS draft looks good, thanks. On 11/26/2019 6:17 AM, Gavin Bierman wrote: Thanks Alex; have made these changes to the online version. Gavin

Re: Updated Draft specs for JEP 359 (Records)

2019-11-26 Thread Dan Smith
> On Nov 25, 2019, at 7:02 PM, Alex Buckley wrote: > > // Cutting amber-dev > > On 11/25/2019 3:23 PM, Gavin Bierman wrote: >> http://cr.openjdk.java.net/~gbierman/jep359/jep359-20191125/specs/records-jvms.html > > The JVMS draft is good. It should have an informative note in 4.7.8: "It is > a

Re: Updated Draft specs for JEP 359 (Records)

2019-11-26 Thread Dan Smith
> On Nov 25, 2019, at 1:54 PM, Alex Buckley wrote: > > OK, though as an editorial matter, avoid a record recording something. Prefer > "... of a ClassFile structure. ***A `Record` attribute denotes information > about the components of a record type (JLS 8.10).***" Good point. I've updated the

Re: Updated Draft specs for JEP 359 (Records)

2019-11-26 Thread Brian Goetz
I understand your concern here; however, the intent is _not_ to update 4.5A and 4.6A at this time. Since the compiler is setting those flags, we can treat this as a bug to be fixed. > On Nov 25, 2019, at 11:57 PM, Leonid Kuskov wrote: > > Hello, > > From my point of view, JVMS is not fully

Re: Updated Draft specs for JEP 359 (Records)

2019-11-26 Thread Gavin Bierman
Thanks Alex; have made these changes to the online version. Gavin > On 26 Nov 2019, at 02:23, Alex Buckley wrote: > > // Cutting amber-dev > > On 11/25/2019 3:23 PM, Gavin Bierman wrote: >> http://cr.openjdk.java.net/~gbierman/jep359/jep359-20191125/specs/records-jls.html > > The JLS draft is

Re: Updated Draft specs for JEP 359 (Records)

2019-11-25 Thread Leonid Kuskov
Hello, From my point of view, JVMS is not fully updated to support Records. The new spec should have  ACC_MANDATED in the tables for its consistency:     Table 4.5-A. "Field access and property flags" , Table 4.6

Re: Updated Draft specs for JEP 359 (Records)

2019-11-25 Thread Tagir Valeev
Hello! Record construction section now sounds good to me, thanks! With best regards, Tagir Valeev. On Tue, Nov 26, 2019 at 6:24 AM Gavin Bierman wrote: > > A further updated draft language spec for JEP 359 (Records) is available at: > > http://cr.openjdk.java.net/~gbierman/jep359/jep359-2019112

Re: Updated Draft specs for JEP 359 (Records)

2019-11-25 Thread Alex Buckley
// Cutting amber-dev On 11/25/2019 3:23 PM, Gavin Bierman wrote: http://cr.openjdk.java.net/~gbierman/jep359/jep359-20191125/specs/records-jls.html The JLS draft is good. Some technical rewordings: 1. 8.10.3: "and the type as the declared type" -- missing a "same" 2. 8.10.3: Say "This field

Re: Updated Draft specs for JEP 359 (Records)

2019-11-25 Thread Alex Buckley
// Cutting amber-dev On 11/25/2019 3:23 PM, Gavin Bierman wrote: http://cr.openjdk.java.net/~gbierman/jep359/jep359-20191125/specs/records-jvms.html The JVMS draft is good. It should have an informative note in 4.7.8: "It is an oversight in the design of the `class` file that there is no way

Re: Updated Draft specs for JEP 359 (Records)

2019-11-25 Thread Maurizio Cimadamore
+1 - I like this. We now define precisely what an accessor and a canonical constructor are - and then rule some of the explicit declarations out, with no room for ambiguities. Great job. Maurizio On 25/11/2019 23:50, Brian Goetz wrote: The approach is much improved. I like that it casts a w

Re: Updated Draft specs for JEP 359 (Records)

2019-11-25 Thread Brian Goetz
The approach is much improved. I like that it casts a wide net for things that could be confused for a canonical ctor / accessor, and then nails down conditions for its correctness, rather than trying to do both in one go — and letting some error cases risk falling through the cracks. It also

Re: Updated Draft specs for JEP 359 (Records)

2019-11-25 Thread Gavin Bierman
A further updated draft language spec for JEP 359 (Records) is available at: http://cr.openjdk.java.net/~gbierman/jep359/jep359-20191125/specs/records-jls.html along with an updated JVMS spec: http://cr.openjdk.java.net/~gbierman/jep359/jep359-20191125/specs/records-jvms.html (Thanks to Maurizi

Re: Updated Draft specs for JEP 359 (Records)

2019-11-25 Thread Alex Buckley
On 11/25/2019 12:42 PM, Dan Smith wrote: On Nov 6, 2019, at 11:21 AM, Alex Buckley wrote: For spec clarity, please rename `component_info` to `record_component_info`. I hadn't seen this comment, but I've now applied this change as requested (will show up next time Gavin posts an update). Tha

Re: Updated Draft specs for JEP 359 (Records)

2019-11-25 Thread Dan Smith
> On Nov 6, 2019, at 11:21 AM, Alex Buckley wrote: > > On 10/31/2019 7:17 AM, Gavin Bierman wrote: >> (Alongside is a draft JVM spec for this feature: >> http://cr.openjdk.java.net/~gbierman/jep359/jep359-20191031/specs/records-jvms.html >> ) > > I looked at this for the CSR JDK-8233595. The `

Re: Updated Draft specs for JEP 359 (Records)

2019-11-21 Thread Alex Buckley
On 11/21/2019 7:01 AM, Gavin Bierman wrote: A hopefully final draft language spec for JEP 359 (Records) is available at: http://cr.openjdk.java.net/~gbierman/jep359/jep359-20191121/specs/records-jls.html This incorporates (I hope!) all the very helpful suggestions from everyone on these lists

Re: Updated Draft specs for JEP 359 (Records)

2019-11-21 Thread Maurizio Cimadamore
Hi Gavin, looks great - some minor comments: * I'm having problem parsing this sentence "An explicitly declared accessor method is not annotated with any applicable annotation that appears on the corresponding record component." What do you mean exactly? I guess you mean that the explicit acc

Re: Updated Draft specs for JEP 359 (Records)

2019-11-21 Thread Gavin Bierman
A hopefully final draft language spec for JEP 359 (Records) is available at: http://cr.openjdk.java.net/~gbierman/jep359/jep359-20191121/specs/records-jls.html This incorporates (I hope!) all the very helpful suggestions from everyone on these lists - many thanks. As always - any further co

Re: Updated Draft specs for JEP 359 (Records)

2019-11-15 Thread Gavin Bierman
Thanks Maurizio > On 31 Oct 2019, at 14:29, Maurizio Cimadamore > wrote: > > Related to the earlier discussion on forbidden record members - how is this > section still relevant? > > "It is a compile-time error for a record declaration to declare a record > component with the name clone, fin

Re: Updated Draft specs for JEP 359 (Records)

2019-11-06 Thread Alex Buckley
On 10/31/2019 7:17 AM, Gavin Bierman wrote: (Alongside is a draft JVM spec for this feature: http://cr.openjdk.java.net/~gbierman/jep359/jep359-20191031/specs/records-jvms.html ) I looked at this for the CSR JDK-8233595. The `component_info` structure which is mentioned all over the place real

Re: Updated Draft specs for JEP 359 (Records)

2019-11-06 Thread Gavin Bierman
> On 2 Nov 2019, at 10:21, Florian Weimer wrote: > > * Gavin Bierman: > >> An updated draft language spec for JEP 359 (Records) is available at: >> >> http://cr.openjdk.java.net/~gbierman/jep359/jep359-20191031/specs/records-jls.html >>

Re: Updated Draft specs for JEP 359 (Records)

2019-11-05 Thread Remi Forax
>> De: "Gavin Bierman" >> À: "amber-spec-experts" , "amber-dev" >> >> Envoyé: Jeudi 31 Octobre 2019 15:17:34 >> Objet: Updated Draft specs for JEP 359 (Records) >> An updated draft language spec for JEP 359 (Records) is

Re: Updated Draft specs for JEP 359 (Records)

2019-11-04 Thread Alex Buckley
On 11/4/2019 12:50 PM, Florian Weimer wrote: I think we are looking at different versions of the spec. I don't see either wording here: But the updated wording works for me. Doh, you're right, and

Re: Updated Draft specs for JEP 359 (Records)

2019-11-04 Thread Alex Buckley
Florian, Thanks for drawing attention to this part of the spec: On 11/2/2019 3:21 AM, Florian Weimer wrote: Is it allowed to declare a canonical constructor explicitly and make it non-public? I think the naswer is no. But it's not quite obvious from the spec, I think. JLS 8.10.4 defines a "

Re: Updated Draft specs for JEP 359 (Records)

2019-11-01 Thread Vicente Romero
Hi Gavin, At: 9.7.4 Where Annotations May Appear, it says: It is a compile-time error if an annotation of type /T/ is syntactically a modifier for: ... *     a record component but /T/ is not applicable to record component declarations, type contexts, type parameter declarations, fiel

Re: Updated Draft specs for JEP 359 (Records)

2019-10-31 Thread Chris Hegarty
> On 31 Oct 2019, at 20:10, Chris Hegarty wrote: > >> ... > > > In terms of javac restrictions in the record declaration… To be clear, javac restrictions *of methods and fields*, in the record declaration… > - 1 and 2 much be allowable, no issue > - a, b, and c, should be lint warnings.

Re: Updated Draft specs for JEP 359 (Records)

2019-10-31 Thread Chris Hegarty
> On 31 Oct 2019, at 17:14, Maurizio Cimadamore > wrote: > > > On 31/10/2019 16:11, Chris Hegarty wrote: >> >>> On 31 Oct 2019, at 15:29, Brian Goetz wrote: >>> "It is a compile-time error for a record declaration to declare a record component with the name |clone|, |finalize|,

Re: Updated Draft specs for JEP 359 (Records)

2019-10-31 Thread Maurizio Cimadamore
On 31/10/2019 16:11, Chris Hegarty wrote: On 31 Oct 2019, at 15:29, Brian Goetz wrote: "It is a compile-time error for a record declaration to declare a record component with the name |clone|, |finalize|, |getClass|, |hashCode|, |notify|, |notifyAll|, |readObjectNoData|, |readResolve|, |

Re: Updated Draft specs for JEP 359 (Records)

2019-10-31 Thread Remi Forax
> De: "Gavin Bierman" > À: "amber-spec-experts" , "amber-dev" > > Envoyé: Jeudi 31 Octobre 2019 15:17:34 > Objet: Updated Draft specs for JEP 359 (Records) > An updated draft language spec for JEP 359 (Records) is available at: > [ > http:

Re: Updated Draft specs for JEP 359 (Records)

2019-10-31 Thread Chris Hegarty
> On 31 Oct 2019, at 15:29, Brian Goetz wrote: > > ... > I think there’s a difference between these two rules — the one about > component names clashing with serialization members, and the one about > useless explicit serialization members. A badly named component could > _implicitly_ give

Re: Updated Draft specs for JEP 359 (Records)

2019-10-31 Thread Chris Hegarty
> On 31 Oct 2019, at 15:29, Brian Goetz wrote: > >> "It is a compile-time error for a record declaration to declare a record >> component with the name |clone|, |finalize|, |getClass|, |hashCode|, >> |notify|, |notifyAll|, |readObjectNoData|, |readResolve|, >> |serialPersistentFields|, |ser

Re: Updated Draft specs for JEP 359 (Records)

2019-10-31 Thread Brian Goetz
> "It is a compile-time error for a record declaration to declare a record > component with the name |clone|, |finalize|, |getClass|, |hashCode|, > |notify|, |notifyAll|, |readObjectNoData|, |readResolve|, > |serialPersistentFields|, |serialVersionUID|, |toString|, |wait|, or > |writeReplace|."

Re: Updated Draft specs for JEP 359 (Records)

2019-10-31 Thread Maurizio Cimadamore
Sorry, I think I was put off tracks by this: "The body of the canonical constructor must not contain a return statement (14.17)." Which appears on both compact and non-compact forms. I think non-compact constructors are just... constructors, so no additional rule/restriction should apply the

Re: Updated Draft specs for JEP 359 (Records)

2019-10-31 Thread Maurizio Cimadamore
Related to the earlier discussion on forbidden record members - how is this section still relevant? "It is a compile-time error for a record declaration to declare a record component with the name |clone|, |finalize|, |getClass|, |hashCode|, |notify|, |notifyAll|, |readObjectNoData|, |readReso

Updated Draft specs for JEP 359 (Records)

2019-10-31 Thread Gavin Bierman
An updated draft language spec for JEP 359 (Records) is available at: http://cr.openjdk.java.net/~gbierman/jep359/jep359-20191031/specs/records-jls.html (Alongside is a draft JVM spec for this feature: http://