Replace the primitive class with a more general null safety?
Anderson Vasconcelos Pires
andvasp at gmail.com
Tue Dec 20 12:52:44 UTC 2022
Hi Glavo,
Below is my opinion. I do not know if it is right.
I believe in your scenario you are changing a lib without changing your
application, right?
When you change from identity to value class there are other
implications that are not just the constructor call. For example,
synchronization. So maybe it should be considered a breaking change.
Another point is if you are going to change a lib in your application you
should recompile your application, make tests. And recompiling would fix
this particular problem given in your example.
So I do not know if a migration solution is/(should be) necessary.
Regards,
Anderson.
On Tue, Dec 13, 2022 at 5:53 AM Glavo <zjx001202 at gmail.com> wrote:
> Another question, will the constructor of the value/primitive class have a
> new migration solution?
>
> For example, most of the record classes may be candidates for becoming
> value classes, but at least in the LW4 prototype,
> making a record class as value class will break the code in other classes
> that call its constructor (throws InstantiationError).
> Will this problem be solved?
>
> On Sun, Dec 4, 2022 at 1:09 AM Brian Goetz <brian.goetz at oracle.com> wrote:
>
>> Yes, but we want to arrive at a consistent point before updating the
>> docs, so naturally the design process skates out ahead of the written
>> collateral.
>>
>> On 12/3/2022 4:38 AM, Glavo wrote:
>>
>> It sounds like the information I'm getting from the JEP docs is outdated,
>> so there's a misunderstanding.
>> Do you have plans to update JEP 401?
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/valhalla-dev/attachments/20221220/aa4f313a/attachment.htm>
More information about the valhalla-dev
mailing list