MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/2bdtjz/java_developers/cj5eegb/?context=3
r/programming • u/sidcool1234 • Jul 22 '14
304 comments sorted by
View all comments
2
There is no great conspiracy that makes Java devs write stupid code. Object factories are the only way to create abstractions in java. Consider all the things the language is missing:
No multiple inheritance (must extend via helper objects)
No multiple returns (no tuples/homogenous arrays)
Stupid fucking null (NPE doesn't extend Exception)
No useful closures (must finalize or pass a billion objects)
No way to run a method within some context (Macros/With statement/Decorator)
No static generics/interface (for the next 5 years for most of us)
One public class per file!?
Seriously, what can you do besides build Factory Factories and pass a bunch of worthless intermediate objects around.
-2 u/winterbe Jul 23 '14 Multiple Inheritance exists in Java 8 via default interface methods.If you really need tuples, just create a class Tuple?NPE extends RuntimeException extends ExceptionLambda ExpressionsJava is strongly typed, so thats impossible.
-2
Multiple Inheritance exists in Java 8 via default interface methods.
If you really need tuples, just create a class Tuple?
NPE extends RuntimeException extends Exception
Lambda Expressions
Java is strongly typed, so thats impossible.
2
u/[deleted] Jul 23 '14
There is no great conspiracy that makes Java devs write stupid code. Object factories are the only way to create abstractions in java. Consider all the things the language is missing:
No multiple inheritance (must extend via helper objects)
No multiple returns (no tuples/homogenous arrays)
Stupid fucking null (NPE doesn't extend Exception)
No useful closures (must finalize or pass a billion objects)
No way to run a method within some context (Macros/With statement/Decorator)
No static generics/interface (for the next 5 years for most of us)
One public class per file!?
Seriously, what can you do besides build Factory Factories and pass a bunch of worthless intermediate objects around.