Public static void main(String[] args) is dead

New main semantics and what actually changed

  • Commenters link to JEP 445/512 and stress that public static void main(String[] args) is not “dead”; the new style is syntactic sugar over a generated class and main method.
  • The new feature mainly targets single-file / entry-point programs: you can write void main() (with optional String[] args) and even top‑level functions/variables, but they live in an implicit unnamed class and aren’t generally accessible from other files.
  • Some are disappointed this doesn’t generalize into true package‑level methods or multiple public types per file; they see it as a minimal, special‑case hack.

Teaching, boilerplate, and beginner experience

  • Many recount being told in school to “just type this incantation” without understanding classes, static methods, or String[] args.
  • Supporters say reducing boilerplate helps day‑1 learners focus on logic instead of ceremony and typo‑prone syntax.
  • Skeptics argue the old form taught useful concepts early and that copying a fixed entry‑point once is a tiny part of real code; some even found it satisfying as it gradually became understandable.
  • There’s broader agreement that Java is a poor first language compared to more concise, syntax‑light options, but this change is seen as a step in the right direction.

Free functions, OOP purity, and design philosophy

  • Heated debate over the lack of true free functions: some call requiring every function to sit in a class a “perversion” that adds fake complexity.
  • Others note the JVM fundamentally has only classes and arrays; many languages (Clojure, Scala, Kotlin) already hide this with compiler tricks.
  • Several criticize Java as “class‑oriented” rather than genuinely object‑oriented; references to “Kingdom of Nouns” and overuse of verb‑classes, factories, and design patterns.

Java’s evolution and comparisons

  • Opinions on Java range from “never horrible, hate overblown” to “finally becoming not horrible after ~30 years.”
  • Many see Java 8 (lambdas) as the watershed; records and pattern matching are also praised, often compared favorably to earlier experiences with Scala and Kotlin.
  • Discussions of primitives vs boxed types (int/Integer) touch on performance, HFT, and ergonomics; some argue the duality is a serious design wart, others say autoboxing largely mitigated it.
  • Timeline comparisons highlight that Scala and C# offered concise main/top‑level code years earlier; Kotlin is described as a “Ruby‑ish static” compromise that Java devs can adopt easily.

Culture, frameworks, and real‑world impact

  • Several argue Java’s biggest problems are cultural: overengineering, framework fetishism (Spring, old J2EE), and massive, slow‑starting applications.
  • Others note that in large, long‑lived enterprise systems, how main is written is essentially irrelevant.
  • Net view: the change is welcomed for teaching, scripting, and aesthetics, but seen as minor for seasoned developers, and not a fundamental shift in how serious Java code is structured.