JEP 445: Unnamed Classes and Instance Main Methods - don not move forward!

Anatoly Kupriyanov kan.izh at gmail.com
Sat Sep 16 14:28:58 UTC 2023


That does not need any changes in the language spec, compiler, etc.
Moreover, there is already JShell - which solves the problem you are trying
to carve, and I don't feel the tool is anyhow popular. It could give you an
idea how "important" the JEP is...

On Sat, 16 Sept 2023 at 14:08, Red IO <redio.development at gmail.com> wrote:

> I really disagree that this feature is a feature for beginners without
> value and "cannot be used once you learn oop properly".
> I don't see why you wouldn't be able to use the feature once you learn
> oop. As far as i understood one can have unnamed classes and other normal
> classes in the same project. Meaning you can have a file like Programm.java
> with the "void main() {}" in it in the root source folder and the packages,
> modules and classes besides it.
> It also makes scripts much easier to write in Java as one can just create
> a file MyScript.java with the main in it and launch it with "java
> MyScript.java".
> Both use cases have nothing to do with students. Fact is the entry point
> doesn't benefit from the class it's declared in. I would say this jep
> removes unnecessary restrictions from Java instead of adding unnecessary
> features. Java is the only language I know that has such a complicated
> entry point. Some languages let you start in the file directly or require
> to declare a main, start.. function. But no language but java requires all
> this class nonsense for the entry point.
>
> Great regards
> RedIODev
>
> On Fri, Sep 15, 2023, 19:40 Arne Styve <arne.styve at ntnu.no> wrote:
>
>> I recently came across this JEP, and was very surprised. Why on earth
>> should you add features to a professional programming language just to
>> apparently make it a bit easier for students and beginners to learn to
>> code? And especially when the suggested feature has no real use (and cannot
>> be used) once you learn to program OOP properly?
>>
>>
>>
>> I’ve been a SW-developer and manager for more than 20 years, and a
>> teacher of OOP at University for 15 years, and have never, ever experienced
>> that the public static void main(String[] args) have been remotely
>> problematic for students in learning to program.
>>
>>
>>
>> Please have this JEP terminated.
>>
>>
>>
>

-- 
WBR, Anatoly.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20230916/22360df2/attachment.htm>


More information about the amber-dev mailing list