Re: Make new Object() backward compatible

2021-05-09 Thread forax
- Mail original - > De: "Brian Goetz" > À: "Remi Forax" , "valhalla-spec-experts" > > Envoyé: Dimanche 9 Mai 2021 17:04:31 > Objet: Re: Make new Object() backward compatible >> The logical conclusion is that java.lang.Object is a parametric class with a >> parameter saying if it should

Re: Make new Object() backward compatible

2021-05-09 Thread Brian Goetz
The logical conclusion is that java.lang.Object is a parametric class with a parameter saying if it should implement IdentityObject or not. Magic hammer, meet nail :) To be explicit, what you're suggesting is something like     class Object { ... } where an identity class extends Object

Make new Object() backward compatible

2021-05-09 Thread Remi Forax
I think there is a way to avoid all the issues we have with new Object(). The problem: We want to inject the interface IdentityObject on all classes that are neither a "no field" abstract class nor a primtive class. But java.lang.Object acts as a "no field" abstract class but it's not an