JEP draft: Implicit Classes and Enhanced Main Methods (Preview)
Archie Cobbs
archie.cobbs at gmail.com
Wed Feb 15 16:37:38 UTC 2023
On Wed, Feb 15, 2023 at 10:17 AM Ron Pressler <ron.pressler at oracle.com>
wrote:
> I've published a JEP draft, Implicit Classes and Enhanced Main Methods
> (Preview) (https://openjdk.org/jeps/8302326)
> based on Brian’s article, Paving the On-Ramp (
> https://openjdk.org/projects/amber/design-notes/on-ramp).
>
I like this. Comments:
Outside the scope of this JEP, but: a smarter launch protocol may be useful
for reasons beyond on-ramping. For example, instead of only looking for
default constructors, you could look for a constructor taking an object of
type LauchEnvironment, which is something to be suitably defined.
The implicit class idea scares me a bit. One issue is that it could turn
invalid code into "working" code inadvertently.
Can "floating" methods in the implicit class be declared scattered across
multiple random source files or do they have to all be in one file? If so,
which one?
Is there a good reason why implicit class support should NOT be restricted
to JEP 330 mode only?
-Archie
--
Archie L. Cobbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-spec-observers/attachments/20230215/051598a6/attachment.htm>
More information about the amber-spec-observers
mailing list