StableValue will be one of the true gems in the upcoming JDK versions!
@chu121su122 ай бұрын
I made userland implementation based on the draft jep
@xozzy78093 ай бұрын
Beauty of simplicity
@gudenau3 ай бұрын
Man these Java changes are super cool, I can't wait to use them when they come out!
@NikitaKovalenko-j7c3 ай бұрын
Excellent talk! Thank you
@jtirex3 ай бұрын
Have been doing lots of ffm stuff for c interop - really looking forward to the segmentmapper, that looks great
@Sm0keySa1m0n3 ай бұрын
Will stable values provide performance benefits for MethodHandle similar to putting one in a static final field?
@delanym3 ай бұрын
I use a CAS "Thunk" class extensively but it will go when this StableValue arrives
@mekud3 ай бұрын
please use IDEA's presentation mode. please.
@krellin3 ай бұрын
nice, actual improvements to the language
@krellin3 ай бұрын
anyone knows what zsh config is that? i like it a lot
@TnTorcivАй бұрын
33:35 "You can't do set accessible to and then update the field that will throw an exception just that it will do if you do the same thing in record. You can't get the offset for the field using unsafe because that will throw an exception but there are ways to do it but I will not tell you how" 🤣🤣🤣
@duckydude203 ай бұрын
want to see what kotlin does with all these jvm features...
@rushslowly94503 ай бұрын
or Scala, especially with value classes it will get interesting to see how Scala responds
@evgheniemelianov35943 ай бұрын
Why not using Optional instead of StableValue? It seems to have the same semantics?
@HonestAuntyElle3 ай бұрын
This is cool, but something that always confuses me, is a lot of stuff that would be key words in another language, are "just idk classes and methods" in java. It makes it difficult to know if something has special behaviour in the VM.
@kaqqao3 ай бұрын
Never understood why you'd want a keyword. You can't later add a method to a keyword, you can't parameterize it, inherit it, or even deprecate it cleanly. And you can do all those things to a class just fine. So why have a keyword (and an ever growing syntax), when a regular old class will suffice? As for knowing about the special treatment by the VM, these classes aren't something you'll ever accidentally use. You'll seek them out only if and when you need a specific optimization. In all other cases, you really don't have to even be aware of their special properties. A StableSupplier is just a supplier after all.
@freemanlau-yl8nq3 ай бұрын
Just call it ‘Once’ :)
@HonestAuntyElle3 ай бұрын
It feels a lot like memoization and lazy loading.
@31redorange083 ай бұрын
OnceOrNever
@HonestAuntyElle3 ай бұрын
Love the concept, hate the API. I want to be able to use this as much as possible by default, but it feels unwieldy, which will only result in people doing hotspot performance improvements using it.
3 ай бұрын
Why do not add a language construct like kotlin's lazy?
@Ethesen3 ай бұрын
@28:10, @31:30
3 ай бұрын
@@Ethesen Thank you! I was not paying attention at the end of the video... :(
@cod3r13372 ай бұрын
Cool, did they just reinvent Kotlin's lazy delegate?
@markepshtein37352 ай бұрын
kotlin lazy provides ability to control how many times lambda can be invoked. Also delegate feature makes it easy to use. StableValue came after kotlin lazy but looks uglier.
@krellin3 ай бұрын
real OOP = a lot of singletones what people actually do is Class Oriented Programming...
@forsakensandor3 ай бұрын
Eh, maybe people's perception of what's maintainable has evolved? Full OOP was never a silver bullet but Java supports it just fine. With new additions, it also supports more reasonable paradigms..
@FlaviusAspra2 ай бұрын
StableValue is anti-oop. But the real sad part: people don't see it.