Re: [External] : Re: Factory methods & the language model

2021-09-09 Thread Dan Smith
On Sep 9, 2021, at 1:13 PM, Dan Heidinga mailto:heidi...@redhat.com>> wrote: but to keep the door open to having both factories and constructors in identity classes, should we use a different syntax for factories in primitive classes now? That way factories would be "spelled" consistently

Re: Factory methods & the language model

2021-09-09 Thread Dan Heidinga
On Thu, Sep 9, 2021 at 2:00 PM Dan Smith wrote: > > To clarify a bit that I left out: this discussion assumes a pretty fixed JVM > feature: a factory method is a static method with a special name, invoked via > invokestatic, and possibly subject to certain constraints about the >

Re: Factory methods & the language model

2021-09-09 Thread Dan Smith
To clarify a bit that I left out: this discussion assumes a pretty fixed JVM feature: a factory method is a static method with a special name, invoked via invokestatic, and possibly subject to certain constraints about the descriptor/enclosing class. I'm not proposing any changes to that basic

Re: Factory methods & the language model

2021-09-09 Thread Dan Heidinga
On Thu, Sep 9, 2021 at 10:24 AM Dan Smith wrote: > > JEP 401 includes special JVM factory methods, spelled (or, > alternatively, with a non-void return), which are needed as a > standardized way to encode the Java language's primitive class constructors. > > We have a lot of flexibility in

Factory methods & the language model

2021-09-09 Thread Dan Smith
JEP 401 includes special JVM factory methods, spelled (or, alternatively, with a non-void return), which are needed as a standardized way to encode the Java language's primitive class constructors. We have a lot of flexibility in how much we restrict use of these methods. Too many