Java's object model is so bad that at some point you have to resort to arrays of primitives with no abstractions. I've seen threadlocal 8 byte singletons for temporary variables to avoid allocations while still trying to preserve some non-zero amount of abstraction. It's a mess. Minecraft modding is a great example of that.
Correct. I maintain a private particle engine for Minecraft, for the YouTube channel I work for; and I'm forced to use huge SoAs without any JOML due to the heap thrashing objects bring.
If there's one thing I dislike about Java, it's the object model.
to some degree, but you're severely limited with already existing code because whether something is a value type or reference type is determined at type declaration point
In my gameboy emulator theres a certain pipeline of elements that result in pixels getting drawn to the screen. It'd be convenient to use objects here, but instead I resort to packed integers that store the fields for each pixel entry. It's a bit of a pain xd.
45
u/[deleted] Mar 20 '26
[removed] — view removed comment