The problem is that if we run that code with the new version of Point (the one
with 3 components),
newPoint.z is not equals to point.z but to 0, so once there is a 'with'
somewhere, there is no backward compatibility anymore.
Yes, in that case, we experience something like "decapitation" of
- Original Message -
> From: "Dan Heidinga"
> To: "Remi Forax"
> Cc: "amber-spec-experts"
> Sent: Tuesday, June 14, 2022 3:10:46 PM
> Subject: Re: with and binary backward compatibility
> Remi, to restate your concern slightly - it sounds like there may be
> binary (and source?) compati
Remi, to restate your concern slightly - it sounds like there may be
binary (and source?) compatibility concerns with the implementation of
with'ers. You've pitched a possible implementation using
invokedynamic (every compiler writer's favourite swiss army knife) but
prefer something that is more
Hi all,
Let say we have a Point with 2 components
record Point(int x, int y) { }
Then we change the record to add a 3rd components in a more or less backward
compatible way
record Point(int x, int y, int z) {
Point(int x, int y) {
this(x, y, 0); // creation of the new value 0
}