New candidate JEP: 463: Implicit Classes and Instance Main Methods (Second Preview)

Brian Goetz brian.goetz at oracle.com
Wed Nov 1 21:54:28 UTC 2023


> 1. In the name of simplifying things for beginners

Any line of thinking that starts this way is dangerous, because it often 
leads to what ends up being a "beginner's dialect of Java", which means 
things to unlearn once the student graduates to "full programs".  
Instead, what we want is for irrelevant details to fade into the 
background until they are needed.  Learning "a program begins with a 
main method" seems reasonable to put on the beginner's radar, in ways 
that the static-instance distinction does not.  The onramp should match 
speed and direction with the highway.

> 2. Alternatively, could we have the name be irrelevant if it is the 
> only method in the class?

If we did this, as soon as someone refactored their program to add a 
second method, we wouldn't know how to launch the program.  This is 
falling off the onramp before you get to the highway!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20231101/caac7869/attachment.htm>


More information about the amber-dev mailing list