New candidate JEP: 445: Flexible Main Methods and Anonymous Main Classes (Preview)

Attila Kelemen attila.kelemen85 at gmail.com
Mon Apr 10 18:00:26 UTC 2023


Hi,

While I like the idea of making the language more beginner friendly, I
don't think the proposal in this form is the best way, because it does
exactly what it claims to want to avoid: It introduces a separate
beginner's dialect. That is, a form of writing code only to be used by
beginners and never again.

It is even stranger that the alternatives lists "Interpret code units
as static members" (which - in my opinion - would be better) and
claims it to be a "distinct Java dialect", despite the fact that this
would only mean that the "static" is implicit, and such implicit
modifier differences would not be without precedent in the language,
yet nobody claims that those are different dialects.

Attila

Mark Reinhold <mark.reinhold at oracle.com> ezt írta (időpont: 2023. ápr.
10., H, 19:37):
>
> 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


More information about the amber-dev mailing list