<div dir="ltr">I haven't decided if I am for or against this JEP. I would like to add a few thoughts. They lean away from the JEP, but don't interpret that as my rejection of the JEP.<br><br><div>I don't write main(). I use a framework and it has a main class to start the application server. Out of the many users of the framework, only the framework maintainer wrote a main(). So, any discussion about main() is really for the maintainer and those not using a framework that has a main class. I put all my server startup initialization in several javax.enterprise.context.@Initialized. I need a class around the @Initialized method to execute a bunch of logic.</div><div><br></div><div>On the other hand, I wrote a Swing application and a few other utility programs. These have a main() method. I only wrote the main() method one time. I made a few changes over the years to the main(). main() has largely been forgotten as I spend most of my time in other parts of these programs. The main() method is the least of my concerns.<br></div><div><br></div><div>Having a special way to write main() means a new syntax. It means learning more and not less. Sure, it might mean the learning curve is less steep (learn less upfront) but now the curve is higher (learn more overall). One has to learn the traditional way to write main(). However, the height of the curve is probably not much higher. Once someone has learned about classes, access restrictions (i.e., public), return types including the weird void, method parameters, static, then the traditional main() is just another method with special use. I can see how having a simple main() would allow people to learn about these other things gradually and build up to the traditional main().<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Sep 16, 2023 at 6:08 AM Red IO <<a href="mailto:redio.development@gmail.com">redio.development@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">I really disagree that this feature is a feature for beginners without value and "cannot be used once you learn oop properly".<div dir="auto">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.</div><div dir="auto">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".</div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">Great regards </div><div dir="auto">RedIODev </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 15, 2023, 19:40 Arne Styve <<a href="mailto:arne.styve@ntnu.no" target="_blank">arne.styve@ntnu.no</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="NO-BOK" style="overflow-wrap: break-word;">
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt">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?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt">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.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt">Please have this JEP terminated.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt"><u></u> <u></u></span></p>
</div>
</div>
</blockquote></div>
</blockquote></div>