<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><br></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Kevin Bourrillion" <kevinb9n@gmail.com><br><b>To: </b>"Remi Forax" <forax@univ-mlv.fr><br><b>Cc: </b>"valhalla-spec-experts" <valhalla-spec-experts@openjdk.org><br><b>Sent: </b>Monday, March 4, 2024 11:57:20 PM<br><b>Subject: </b>Re: Migrating library classes to value classes<br></blockquote></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr"><div dir="ltr">On Mon, Mar 4, 2024 at 2:44 PM Remi Forax <<a href="mailto:forax@univ-mlv.fr" target="_blank">forax@univ-mlv.fr</a>> wrote:<br></div><div dir="ltr"><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><div><span style="font-size:12pt">For a class that you want to see both as an identity class and a value class, either you use Maven or Gradle (see [1]) but you have to hand manage the different versions or you use a special bytecode rewriter that look for annotations internal to your project and duplicate the classes (it seems a good use case for the classfile API) with one version being an identity class and one version being a value classes.</span></div></div></blockquote><br><div>And don't forget the testing impact.</div></div></div></blockquote><div><br></div><div>Yes, you need to rewite *before* testing :)<br data-mce-bogus="1"></div><div><a href="https://github.com/forax/civilizer/blob/master/pom.xml#L69">https://github.com/forax/civilizer/blob/master/pom.xml#L69</a></div><div><br data-mce-bogus="1"></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr"><div class="gmail_quote"><br><div>I view this as not a good solution, and think that approaches that don't require users to rig up such machinery on their side are worth finding when possible.</div></div></div></blockquote><div><br data-mce-bogus="1"></div><div>Having two classes for any value classes is also what the JDK does for all @ValueBased classes.</div><div>The other solution is to backport behavior of the new VMs to the old ones but this is similar to Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Rémi<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div></div></div></body></html>