5 ms·
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 redu
by yohannesk 1y ago
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?
- mhh__ 1y agoWhy 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)
- textlapse 1y agoA 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.
- deleted 1y ago[deleted]
- jayd16 1y agoIt always was and is a random special case.
- fhd2 1y agoThis 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.
- cies 1y agoAnd 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".
- BinaryRage 1y agoSee Brian's article "Paving the on-ramp": https://openjdk.org/projects/amber/design-notes/on-ramp https://openjdk.org/projects/amber/design-notes/on-ramp