News for hackers. Stuff that matters.
Re:Cursed Linear Types in Rust by cempaka on Sunday December 01, 2024 @03:20PM (#42290470)
And Java will soon have StableValue: https://openjdk.org/jeps/8312611
Re:Cursed Linear Types in Rust by neonsunset on Sunday December 01, 2024 @04:29PM (#42290860)
Reading the JEP, isn’t StableValue about JIT constants?

In .NET it’s just 'static readonly'.

Re:Cursed Linear Types in Rust by cempaka on Sunday December 01, 2024 @06:28PM (#42291568)
The basic feature set is at-most-once thread-safe initialization of values, which can then enjoy the same constant folding and other JIT optimizations one would get from `static final`, but can be initialized at any point during the program's run.
Re:Cursed Linear Types in Rust by mrkeen on Sunday December 01, 2024 @04:47PM (#42290968)

  Non-goals
  It is not a goal to provide Java language support for declaring stable values.
Hmmm
Re:Cursed Linear Types in Rust by jcrites on Sunday December 01, 2024 @05:13PM (#42291108)
From context, I would infer that this means they are not changing the Java language itself. It’s a feature expressed through the existing language, like as a library feature. I could be wrong though.
Re:Cursed Linear Types in Rust by cempaka on Sunday December 01, 2024 @06:29PM (#42291575)
Yes you're correct, the idea is that they're not adding any keywords or bytecodes, just some new standard lib APIs that will get some special treatment by the JVM.