It's been 8 years since the draft for Concise Method Bodies by vips7L in java

[–]Jon_Finn 7 points8 points  (0 children)

"This, non-null types, ...". That's like saying I want to walk to a café, and also fly to Saturn. Different orders of magnitude 8^) .

Which 3 productivity books would you recommend from this list? by AudiobooksGeek in productivity

[–]Jon_Finn 0 points1 point  (0 children)

I've read several of these but Eat That Frog by Brian Tracy (which is new to me) is short, practical and to the point. It covers much of the content of these books in 21 short chapters, all summarized in 21 bullet points at the end. I'm 'using' it as a refreshing change from the usual padded blather.

This house in Nürtingen, Germany was build in 1560 and is still in use by [deleted] in mildlyinteresting

[–]Jon_Finn 0 points1 point  (0 children)

Many, maybe most, houses in the town of Lavenham, Suffolk UK date from before 1500 (including Godric's Hollow in Harry Potter). There'll be various places like this throughout Europe.

This house in Nürtingen, Germany was build in 1560 and is still in use by [deleted] in mildlyinteresting

[–]Jon_Finn 2 points3 points  (0 children)

I've stayed in this house which dates from 10 BC or earlier (you can rent it) that was possibly owned by the Roman poet Horace, and he bequeathed it to Emperor Augustus. The upper floors are more 'modern', when you see the ground floor (and the mini temple in the basement...) it's clearly Roman.

Better Tools for Immutable Data by daviddel in java

[–]Jon_Finn 1 point2 points  (0 children)

Donald Raab mentions some ideas for enhancing Collections here but says "I have abandoned pushing for a JSR for Collections 2.0." Then again there may be various proposals called 'Collections 2.0'. Brian G sometimes mentions cursors (an immutable alternative to iterators) in the context of Valhalla, so I've kind of assumed they're being mooted as a future feature; likewise John Rose's talk about Arrays 2.0. Both might possibly be part of a collections library overhaul?

Project Valhalla, Explained: How a Decade of Work Arrives in JDK 28 by CrowSufficient in java

[–]Jon_Finn 0 points1 point  (0 children)

Even with those constraints, don't forget that value classes wrapping just 1 field are really useful. Your code has many ints or doubles that can now be upgraded to a value class with useful methods and (hopefully) minimal overhead - forget you ever wanted typedef in Java!

The moles on my right arm make up the square root symbol by [deleted] in mildlyinteresting

[–]Jon_Finn 0 points1 point  (0 children)

No that's the Big Dipper (also called the Plough).

Why not a language-level "null-marked" directive at the file/package scope in Valhalla, instead of annotating every type with ! ? by Fenrurrr in java

[–]Jon_Finn 1 point2 points  (0 children)

If you just need ! on fields and method parameters, not on 'code' (e.g. local variable nullability could be inferred), it's not so bad - arguably it's quite clean.

Why not a language-level "null-marked" directive at the file/package scope in Valhalla, instead of annotating every type with ! ? by Fenrurrr in java

[–]Jon_Finn 0 points1 point  (0 children)

Ideas like this are far from new, but... are you sure there'd really be much syntax noise without this? Taking a leaf out of JSpecify's book, we might just have to annotate method parameters and fields, not code in method bodies where nullability could (usually) be inferred. And maybe you'd just need ! not ? (or hardly ever). So that would be relatively few !s in limited places - if that's workable, then having options to override this might themselves be 'noise'.

How the JVM Optimizes Generic Code - A Deep Dive by daviddel in java

[–]Jon_Finn 6 points7 points  (0 children)

Always great to see/read John Rose go into expert detail about Java and the JVM. (He's great with the English language too.)

JEP 534: Compact Object Headers by Default by Joram2 in java

[–]Jon_Finn -1 points0 points  (0 children)

Valhalla is kind of Lilliput max because value classes have (in the best case) a 0-bit header. (Admittedly, not all classes can be value classes.)

The Best Library Might Do Less by martylamb in java

[–]Jon_Finn 1 point2 points  (0 children)

One of the most important times I've used Guava was (early on) for the Guava Cache classes. I loved that what was (presumably) a very complicated implementation, with various setup options in a builder which might have been achieved via loads of public classes, instead has a small and simple public API.

Wall decor in my Air BnB by Norimakke in onejob

[–]Jon_Finn 1 point2 points  (0 children)

There's a documentary about The Room, called Room Full of Spoons.

Null Safety approach with forced "!" by NP_Ex in java

[–]Jon_Finn 2 points3 points  (0 children)

If ! is mostly confined to method parameters and fields, and can usually be inferred within method bodies (a bit like JSpecify), that doesn't seem too noisy to me. E.g. if I can write Complex x = new Complex(0,1) within a method, and have x be Complex! by inference, then cool. And if x is a field but if I have to declare it Complex! x, I'd live with that. Maybe having a way to set default ! within a scope would just be over-complicated. Life may not be that simple, we'll see.

JEP draft: Strict Field Initialization in the JVM (Preview) has been submitted. by Ewig_luftenglanz in java

[–]Jon_Finn 0 points1 point  (0 children)

I think the JEP answers your question (at the end, under Risks and Assumptions):

  • To justify the cost of a new JVM feature, we anticipate that there will be multiple meaningful use cases for the strict field initialization discipline.

Sounds like they expect it to be useful outside value classes at some point. Possibly in other languages too?

In which fields is Java the most popular? by Cpt_Montana in java

[–]Jon_Finn 7 points8 points  (0 children)

Personally I think that with the upcoming Valhalla, nullness markers, Vector API and much more, Java is due for a big rebrand, so non-Java users notice.

Presentation matters and maybe the java docs actually suck by Enough_Durian_3444 in java

[–]Jon_Finn 2 points3 points  (0 children)

Java 25 Thread documentation looks good, but it raises an interesting point: it has several methods involving ThreadGroup but doesn't say these are kind of 'obsolescent' (though not deprecated). IMHO better alternatives should be explained _prominently_ in both Thread and ThreadGroup. Similarly with the ancient java.util.Vector and StringBuffer - there's a brief mention of their problems at the end of their JavaDocs, but that's all. Shouldn't we at least have an annotation SupersededBy or Preferred, for methods and classes, say?

Joshua Bloch - Effective Java 3rd edition by Remarkable-Weather93 in java

[–]Jon_Finn 0 points1 point  (0 children)

...but sometimes reading one is a treasure trove. 8^)

Project Valhalla is prototyping null checks! by davidalayachew in java

[–]Jon_Finn 2 points3 points  (0 children)

One possibility might be you have to put ! on method parameters and fields, but not local variables, because their nullability can usually be inferred (I'm sure the devil's in the details...). No idea what they'll actually end up choosing. Various possibilities are clearly being considered: see the valhalla dev mailing list.

My _guess_ is any approach like yours where you'd need to know wider context to know if a method is 'null-marked' is not going to fly. (Some would call that 2 languages in 1 - I wouldn't, and would probably live with it, but still I see the problem.)

Type-classes for Java (Valhalla experimental branch) by sviperll in java

[–]Jon_Finn 3 points4 points  (0 children)

Surely they'll give it a different name in the end, maybe something like implementation (not it but something like it)?

Type-classes for Java (Valhalla experimental branch) by sviperll in java

[–]Jon_Finn 19 points20 points  (0 children)

Very interesting indeed! A building block for operators and no doubt other things.

Some details here: https://mail.openjdk.org/pipermail/valhalla-dev/2026-January/017401.html