Re:Minecraft removing obfuscation in Java Edition
by Romario77 on Wednesday October 29, 2025 @06:28PM
(#45753928)
You could write crappy code in any language. I don't think it's specific for Java. Overall I think java is pretty good, especially for big code bases.
[ Parent
| on HN ]
Re:Minecraft removing obfuscation in Java Edition
by stefs on Wednesday October 29, 2025 @07:26PM
(#45754478)
But there's a real difference how easy it is to write crappy code in a language. In regards to java that'd be, for example, nullability, or mutability. Kotlin, in comparison, makes those explicit and eliminates some pain points. You'd have to go out of your way and make your code actively worse for it to be on the same level as the same java code.
And then there's a reason they're teaching the "functional core, imperative shell" pattern.
Re:Minecraft removing obfuscation in Java Edition
by fiddlerwoaroof on Thursday October 30, 2025 @12:15AM
(#45756380)
On the other hand, Java's tooling for correctly refactoring at scale is pretty impressive: using IntelliJ, it's pretty tractable to unwind quite a few messes using automatic tools in a way that's hard to match in many languages that are often considered better.
Re:Minecraft removing obfuscation in Java Edition
by throwaway2037 on Thursday October 30, 2025 @10:34AM
(#45760465)
I agree with your point, and I want to second C# and JetBrains Rider here. Whatever refactoring you can with Java in JetBrains IntelliJ, you can do the same with C#/Rider. I have worked on multiple code bases in my career that were 100sK lines of Java and/or C#. Having a great IDE experience was simply a miracle.
Re:Minecraft removing obfuscation in Java Edition
by stefs on Thursday October 30, 2025 @06:39PM
(#45766226)
The language Kotlin is actually developed by JetBrains
Re:Minecraft removing obfuscation in Java Edition
by fiddlerwoaroof on Saturday November 01, 2025 @02:10PM
(#45783885)
I've found that IntelliJ's refactorings don't work as well for Kotlin as Java but, also, I've avoided Kotlin because I don't like it very much.
Re:Minecraft removing obfuscation in Java Edition
by taneq on Wednesday October 29, 2025 @07:58PM
(#45754709)
You gotta admit, though, that a language which strongarms you into writing classes with hidden state and then extending and composing them endlessly is kinda pushing you in that direction.
It’s certainly possible to write good code in Java but it does still lend itself to abuse by the kind of person that treated Design Patterns as a Bible.
Re:Minecraft removing obfuscation in Java Edition
by stirfish on Wednesday October 29, 2025 @11:23PM
(#45756103)
>kind of person that treated Design Patterns as a Bible
I have a vague idea of what the Bible says, but I have my favorite parts that I sometimes get loud about. Specifically, please think really hard before making a Singleton, and then don't do it.
Re:Minecraft removing obfuscation in Java Edition
by taneq on Thursday October 30, 2025 @12:54AM
(#45756569)
OK yeah that's a pretty good general principle. You think you only need one of these? Are you absolutely certain? You SURE? Wrong, you now need two. Or three.
Re:Minecraft removing obfuscation in Java Edition
by BlackFly on Thursday October 30, 2025 @04:57AM
(#45757784)
A singleton is more than just, "I only need one of these," it is more of a pattern of "I need there to be only one of these," which is subtly different and much more annoying.
Re:Minecraft removing obfuscation in Java Edition
by com2kid on Thursday October 30, 2025 @04:44AM
(#45757717)
Singletons are so useful in single threaded node land. Configuration objects, DB connection objects that have connection pooling behind them, even my LLM connection is accessed via a Singleton.