165 karma · joined Jan 21, 2014 (12y ago) · 38 submissions
comment 1y ago · link · parent
Other tools and libraries generally do not interact in such an errorprone manner.
That said, when you know how it works, what it needs, and you know how to iron all of those tiny wrinkles, it works fine and saves you some code and/or sanity. It's not the devil, it's a powerful tool with some downsides.
comment 1y ago · link · parent
The upsides are: - it generates code and does not do anything funky with internals, - it has a lot of knobs if you need something a little different.
The downside is that it does not provide you with the other Lombok annotations. In practice that has been OK!
comment 1y ago · link · parent
comment 3y ago · link · parent
No, the CLI `--add-opens` CLI option will stay. In other words, applications will need to consciously enable the encapsulation-breaking stuff. Is that bad? Modern software moved to public APIs quite a bit ago. That said, if old applications want to use new JDKs, they will require quite some developement, yes.
comment 3y ago · link · parent
Sorry for the tangent, it had to get out somewhere and I did not think it was worthy of an email in the actual review thread : - )
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 5y ago · link · parent
There are some engines, frameworks: https://jmonkeyengine.org/, https://litiengine.com/, https://libgdx.com/, https://www.lwjgl.org/.
But I have no real experience with any of those.
comment 5y ago · link · parent
Or was this for Object/boxed primitives, too?
comment 5y ago · link · parent
You could, manually :). Either way if they're hot, they're inlined.
One common trick for open-addressing maps in Java I don't see in your implementations is to have an array of keys zipped with values (or two arrays, one for keys, one for values) instead of array of Entries. This improves locality and indirection a bit. Obviously more is needed for even more speed.
(Mandatory "in the future it will be better": Valhalla is coming in a few years, that's when we'll have much more control over the memory layout.)
comment 5y ago · link · parent
comment 6y ago · link · parent
comment 6y ago · link · parent
Java 14 is getting an experimental preview of Records (https://openjdk.java.net/jeps/359) which takes care of much (but not all) of ceremony around "data classes".
And Java 13 got a preview of text blocks, https://openjdk.java.net/jeps/355.
Things are coming. That said, I hardly believe those minor syntax improvements are what is so "good" about Kotlin. It has some better defaults (non-null by default, final classes by default), and is a more modern language. Java will stay with us for many years to come, though.
comment 7y ago · link · parent
The work on that project has been impressive, and there is now an experimental EA build called LW2 where you can play with value types: https://wiki.openjdk.java.net/display/valhalla/LW2
Will this solve everything? No. The char type is hosed. But there will be an opportunity to e.g. get a new Character.
comment 7y ago · link · parent
TLDR: XXH3 uses less cycles per key, by about 30%. The real throughput / latency need a more equal and thorough benchmark of both, though.
comment 7y ago · link · parent