Re: The gift that keeps on giving

2019-03-11 Thread forax
> De: "Brian Goetz" > À: "Remi Forax" > Cc: "valhalla-spec-experts" > Envoyé: Mardi 12 Mars 2019 00:39:46 > Objet: Re: The gift that keeps on giving > Heh, because by " I’m working on a story here, but for now, let’s just put > this > on the list of legacy pain that we will eventually have to

Re: The gift that keeps on giving

2019-03-11 Thread forax
oops, i've forgotten to mention that the constructor / factory method known by the serialization should work like a copy constructor. with your example: value class X implements Serializable { int x; public X() { x = 0; } public X withX(int x) { ALOAD this ILOAD x

Re: The gift that keeps on giving

2019-03-11 Thread Remi Forax
Hi Brian, given that a value type is constructed by a factory method (the constructor is desugared to a static method), why not making the serialization aware of that factory method. Rémi - Mail original - > De: "Brian Goetz" > À: "valhalla-spec-experts" > Envoyé: Lundi 11 Mars 2019