Recent submissions

Comment · 3 days ago
But what example would you have to demonstrate it's more powerful? As a matter of fact, Kotlin smart-cast approach can't tolerate mutability because it can't guarantee safety, yet Java guarantees.
Comment · 6 days ago
But they should use reasoning first.
Comment · 7 days ago
Wait, what do you mean Kotlin smart-casting is more powerful than pattern matching? Like what example?
Comment · 1 month ago
Trust me. That's a common argument used when java introduces new features. Wait you see the same argument once value classes come to jdk 28.
Comment · 1 month ago
Yes.. lol. The biggest argument now is Kotlin having nullness by default in the language. Just check around the comment section. Now java is planning to have them which will further help jvm to optimise for performance. Not sure what the next argument will be after.
Comment · 1 month ago
Really? I don't thinks so. There is a reason JEP 539 is in preview. There is a reason internal annotations exists in current valhalla jdk prototype and upcoming java 28 such as @jdk.internal.vm.annotation.NullRestricted, @jdk.internal.value.ValueClass.newNullRestrictedNonAtomicArray. Also, there is a reason value classes are allowed to be null. This is because nullness types will be a key factor to the java language.
Comment · 1 month ago
Once it gets nullness types, hackernews is gonna explode!
Comment · 1 month ago
Typeclasses caught me by surprise. Smart move by the java team.
Comment · 2 months ago
Also, future specialisation if it is introduced, it will enable the JIT to get enough information to ensure <T> becomes stored in cpu registeres or enable <T[]> to be flattened in memory.
Comment · 3 months ago
Yeaaah. They are going to introduce approaches for the programmer to decide if tearability is allowed or not. Already there are internal annotations for fields and types to enable it that probably will become a language feature in future.
Comment · 3 months ago
They are researching to have immutable arrays. Also multifields (stack allocated arrays as fields in value classes). So, there is a possibility.
Comment · 3 months ago
I've done some tests with current value classes in latest prototype with full optimisation through annotation. Apparently, everything was being compiled to assembly code with no gc calls. It seems this old school ideology of slow java is about to end in near future. I'm actually intrigued how it will compete with Rust which can't optimise code further while running, while JVM JIT has more info which it could aggressively further optimise, especially hot paths.
Comment · 4 months ago
Also, this will be used for future null-restricted types.
Comment · 4 months ago
Better late than never.
Comment · 4 months ago
This time, 30mb.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton