News for hackers. Stuff that matters.
Re:Public static void main(String[] args) is dead by yohannesk on Tuesday September 16, 2025 @01:04AM (#45258196)
Why not abstract away the public static void main(String[] args) method with a top-level statement paradigm, similar to C#'s entry point simplification, to reduce boilerplate and enhance code conciseness?
Re:Public static void main(String[] args) is dead by BinaryRage on Tuesday September 16, 2025 @01:13AM (#45258252)
See Brian's article "Paving the on-ramp": https://openjdk.org/projects/amber/design-notes/on-ramp
Re:Public static void main(String[] args) is dead by mhh__ on Tuesday September 16, 2025 @01:11AM (#45258238)
Why should the entry point be a random special case? You're already admitting at this point that OOP is flawed so you might as well just have the balls to design a proper alternative (rather than a kludge)
Re:Public static void main(String[] args) is dead by fhd2 on Tuesday September 16, 2025 @02:49AM (#45258862)
This pattern isn't OOP, there is no objects here. And Java generally isn't a good example of an OO language to me. It's more like Class Oriented Programming. That is mighty flawed but was for some reason quite fashionable.

I wouldn't consider OO the way Ruby and other actually well designed languages do it flawed.

Re:Public static void main(String[] args) is dead by cies on Tuesday September 16, 2025 @02:59AM (#45258943)
And Ruby is basically Smalltalk with a friendly syntax and lots of FP-goodness where it makes sense.

Or, Ruby is a cute (mostly subset of) Perl.

And after some Kotlin I must say: Kotlin is an acceptable "Ruby with static types".

Re:Public static void main(String[] args) is dead by textlapse on Tuesday September 16, 2025 @01:22AM (#45258307)
A special static class that cannot be instantiated is not OOP already.

C# does this well by letting you OOPfy your other code but doesn’t require you to use OOP for this monstrosity.

Re:Public static void main(String[] args) is dead by jayd16 on Tuesday September 16, 2025 @01:52AM (#45258502)
It always was and is a random special case.