Fwd: New candidate JEP: 445: Flexible Main Methods and Anonymous Main Classes (Preview)
Tesla Zhang
ice1000kotlin at foxmail.com
Mon Apr 10 21:47:23 UTC 2023
> not to allow instance methods to be main methods, and implicitly treat top-level variable and method declarations as static and public -- just like interfaces do.
Strongly agree.
Best regards,
Tesla
------------------ Original ------------------
From: "Glavo" <zjx001202 at gmail.com>;
Date: Tue, Apr 11, 2023 02:34 AM
To: "amber-dev"<amber-dev at openjdk.org>;
Subject: Fwd: New candidate JEP: 445: Flexible Main Methods and Anonymous Main Classes (Preview)
---------- Forwarded message ---------
From: Glavo <zjx001202 at gmail.com>
Date: Tue, Apr 11, 2023 at 2:25 AM
Subject: Re: New candidate JEP: 445: Flexible Main Methods and Anonymous Main Classes (Preview)
To: amber-dev at openjdk.org <amber-dev at openjdk.org>
Cc: Ron Pressler <ron.pressler at oracle.com>, amber-dev at openjdk.org <amber-dev at openjdk.org>, jdk-dev at openjdk.org <jdk-dev at openjdk.org>
I like some parts of this proposal, but I disagree with it. I think this proposal is too narrow and limits its usefulness.
Is the implicit public and static modifiers strange? The interface has worked this way for many years, why is it not acceptable here?
Personally, I'd prefer not to allow instance methods to be main methods, and implicitly treat top-level variable and method declarations as static and public -- just like interfaces do.
I think this could be a step towards package-level declarations, whereas the current proposal limits the direction it can go.
On Tue, Apr 11, 2023 at 1:37 AM Mark Reinhold <mark.reinhold at oracle.com> wrote:
https://openjdk.org/jeps/445
Summary: Evolve the Java language so that students can write their
first programs without needing to understand language features designed
for large programs. Far from using a separate dialect of Java, students
can write streamlined declarations for single-class programs and then
seamlessly expand their programs to use more advanced features as their
skills grow. This is a preview language feature.
- Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20230410/9f643182/attachment-0001.htm>
More information about the amber-dev
mailing list