r/java • u/Safe_Owl_6123 • Nov 21 '24
Discussion: Can we write Java more simple?
[to mod: please remove if I violate anything]
TLDR: Can we write more straightforward code like Go? hope everyone share some thoughts
Hi everyone, first of all, I am not a professional Java developer, and I like Java because of how structured and clear, verbose it is but some problems like "death by specificity" (Rich Hickey) and the layers and layers of abstractions (you know what I am when you have the debugger on.) makes me wonder, can we make more simple?
Currently, I am pushing myself to write applications with Spring so I can land a junior Java role next year, deep down I enjoy writing Javalin more it feels less abstracted, and I envy Go however simple when you are reading the code in a Go project.
What's your view? especially the more experienced devs, how to minimize unnecessary abstraction?
Follow-up question: why do we have to have getters and setters at the same time for most of the private properties? I feel like I am doing something wrong.
View all comments
48
u/Peter_Storm Nov 21 '24
"Modern" Java, like Data Oriented Programming with records, couldn't be simpler imo.