4 ms·
Java 23
- paulddraper 2y agoRIP static void main(String[] args) You'll be missed by Java jokes everywhere
- exabrial 2y agoAlso RIP visitor pattern on ASM, holy macro.... That was "edgy" and "innovative" at the time and people thought they were being cool... Thank you for everyone that worked on it, but we can all agree now with the benefit of hindsight that was overreaching.
- dartos 2y agoI’ve learned that when we I feel like my production code is cool or exceptionally clever, I’m doing too much of something or making too many assumptions
- exabrial 2y agoMarkDown comments! Thank you!
- seadan83 2y agoYes!!! Yay! I am so overjoyed. I have been actively wanting this feature over half a decade. Over the same time, my javadocs are already written in markdown with sparse html smuggled in as strictly needed. For example, instead of: ``` <p>Accepts these inputs:<br> <ul> <li>phone numbers</li> <li>zip codes</li> </ul> ``` I have been writing: ``` Accepts these inputs: <br> - phone numbers <br> - zip codes <br> ``` My spiel is super well rehearsed to discuss why most projects should not write their javadocs in full html. Every project I have worked on over 2 decades has never actually rendered javadocs to the standalone HTML pages. Those projects are (i believe) the exception, things like library code. Thus, most developers read the documentation in the source code, not as rendered html. Caveat: Yes, some IDEs will render the html javadocs inline in source. I do think that has been a useful crutch. But, why force a developer the extra burden of writing html if nobody wants to read html? Three cheers for markdown!! <3
- stonemetal12 2y agoIf the wikipedia page is to be believed a pretty underwhelming release. The only thing not a preview or change of defaults is markdown doc comments. https://en.wikipedia.org/wiki/Java_version_history#Java_23 https://en.wikipedia.org/wiki/Java_version_history#Java_23
- PaulHoule 2y agoHere is the official feature list https://openjdk.org/projects/jdk/23/ https://openjdk.org/projects/jdk/23/ 471 could be the harbinger of breaking changes if they further deprecate it by making you flip on a startup option in a later version, like the way JDK 9 broke a lot of stuff that still needs --add-exports or --add-opens to run. The winner in the "never gets out of the incubator" is 469 (the Vector API) which would be easy to blame on vector instructions being a perennially moving target but is really hung up on the (difficult) Project Valhalla -- however it's the kind of project you might have to finish quickly or never finish because every delay gives the targets another chance to move.
- paulddraper 2y agoModule imports, pattern matching on primitives. Most of the improvements are in existing preview areas. This is following the semiannual release cadence.
- throw0101a 2y agoJust as a reminder, the LTS releases are 8, 11, 17, 21 (released September 2023), and forthcoming 25 (September 2025): * https://www.oracle.com/java/technologies/java-se-support-roadmap.html https://www.oracle.com/java/technologies/java-se-support-roa... * https://en.wikipedia.org/wiki/Java_version_history https://en.wikipedia.org/wiki/Java_version_history
- PaulHoule 2y agoI love https://openjdk.org/jeps/482 https://openjdk.org/jeps/482 as being forced to call super() first thing in constructors was an annoyance to me when I was coding Java before JDK 1.0.
- kasperni 2y agoIt is actually a prerequisite for Valhalla (value classes) now. As value class fields must be defined before calling super.
- CharlieDigital 2y agoInteresting seeing some similar ideas percolating through different languages and platforms. Some of the proposals/in-progress features look very similar to features rolled out in C# over the last 3-4 years.
- seadan83 2y agoI am not current with C#. If I may ask - which features specifically?
- CharlieDigital 2y ago455: Primitive Types in Patterns, instanceof, and switch (Preview) https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/patterns https://learn.microsoft.com/en-us/dotnet/csharp/language-ref... https://timdeschryver.dev/blog/pattern-matching-examples-in-csharp#why-pattern-matching https://timdeschryver.dev/blog/pattern-matching-examples-in-... 469: Vector API (Eighth Incubator) https://devblogs.microsoft.com/dotnet/dotnet-8-hardware-intrinsics/ https://devblogs.microsoft.com/dotnet/dotnet-8-hardware-intr... 473: Stream Gatherers (Second Preview) I didn't read it closely enough to determine if this is more like LINQ over C#'s IEnumerable or more like System.Threading.Channels. https://chrlschn.dev/blog/2023/10/dotnet-task-parallel-library-vs-system-threading-channels/ https://chrlschn.dev/blog/2023/10/dotnet-task-parallel-libra... 476: Module Import Declarations (Preview) Some bits of this: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-10#global-using-directives https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/cs... But probably more aligned with: https://learn.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#adding-a-packagereference https://learn.microsoft.com/en-us/nuget/consume-packages/pac... 477: Implicitly Declared Classes and Instance Main Methods (Third Preview) https://learn.microsoft.com/en-us/dotnet/core/tutorials/top-level-templates https://learn.microsoft.com/en-us/dotnet/core/tutorials/top-... 480: Structured Concurrency (Third Preview) Also feels like one aspect of System.Threading.Channels.
- neonsunset 2y agoAlso add structured concurrency to the list - it's a subset of functionality that arises from simple usage of Task composition and async/await since their introduction. Other than that, note that Panama Vectors are in a rough shape at this moment. Perhaps more feedback from users will make the authors realize that both API and implementation are flawed and map poorly onto many critical parts of algorithm implementations, particularly shuffles. They require a lot more API changes and implementation work to catch up to the current state of Vector APIs in .NET. Of course the reality of not having access to stack buffers and fast off-heap memory allocation/deallocation also hinders the usability. In the end, both of these will be at least partially mitigated with pain of engineers who work on e.g. Lucene, but it's something that comes to C# "naturally" and is easily accessible to a developer that does not have as much prerequisite knowledge.
- deleted 2y ago[deleted]
- jauntywundrkind 2y agoNot new to this release, but digging the scoped variables, alike async-local-storage in js. It's interesting that computing languages seems to be evolving a whole new storage subsystem for languages, that promises/subprocesses/async now has some free form associative stores to go with. https://openjdk.org/jeps/481 https://openjdk.org/jeps/481 I also really like relaxing constraints on when super() has to be called in constructors. It feels like language designers have been super super scared to let users do anything maybe possibly untoward, and have massively restricted constructors as a keep-you-all-safe-from-yourselves move. But it hampered hackability of inheritance, and makes a bunch of initialization tasks hard or frustrating to do, requires participation from your super. I'd love to see this shift come to other languages, of trying to do some relaxation of what can come before super(). https://openjdk.org/jeps/482 https://openjdk.org/jeps/482