• by quotemstr on 11/10/2024, 5:13:17 PM

    https://shipilev.net/jvm/anatomy-quarks/17-trust-nonstatic-f... is a damned shame. User code misses out on an important optimization available only to system-provided classes because certain frameworks have abused JNI and reflection to mutate final fields, which by all rights should be immutable.

    Platforms, especially compilers and runtimes, need to be absolutely strict in enforcing semantic restrictions so as to preserve optimization opportunities for the future.

  • by lukeh on 11/10/2024, 10:41:22 PM

    Tangential: Apple has a new Swift Java bridge which is pretty cool, supporting both JNI and Panama. I’ve been porting it to Android this past week.

    https://github.com/swiftlang/swift-java

  • by lsuresh on 11/10/2024, 9:37:40 PM

    Happy to see this gem shared here. I've learnt a lot about the JVM going through these.

    This article about the "stack allocation" misnomer in Java in particular is one of my favorites: https://shipilev.net/jvm/anatomy-quarks/18-scalar-replacemen.... What the JVM really does is escape analysis + scalar replacement.

  • by exabrial on 11/10/2024, 6:35:38 PM

    I love the "size" of these posts. Kinda neat to just read through one in a few mins and maybe run the bench locally.

  • by plandis on 11/11/2024, 1:30:30 AM

    If you work for a few years with JVM based languages this set of articles are so interesting! I remember reading through these for the first time several years ago.

  • by wging on 11/11/2024, 8:11:29 AM

    Does anyone know why the name of this series was changed from ‘JVM Anatomy Park’?

  • by azinman2 on 11/10/2024, 8:33:52 PM

    I’ve basically forgotten about Java. It would never occur to me to start a new project in it. Am I the only one? It feels like I’d reach for python if I want fast development and flexibility, Go if I want to handle a bunch of I/O concurrency in a garbage collected way, Swift if I want a nice language that’s compiled and balanced, or Rust if I want performance and safety in a compiled language. Those are just my personal leanings. I know kotlin has made Java more ergonomic, and yet….