HackerTrans
トップ新着トレンドコメント過去質問紹介求人

dfa11

no profile record

投稿

[untitled]

1 ポイント·投稿者 dfa11·先月·0 コメント

[untitled]

1 ポイント·投稿者 dfa11·先月·0 コメント

Java: Rethink Domain Primitives with Valhalla

dfa1.github.io
31 ポイント·投稿者 dfa11·2 か月前·11 コメント

Show HN: Java RocksDB Without JNI

github.com
3 ポイント·投稿者 dfa11·3 か月前·0 コメント

[untitled]

1 ポイント·投稿者 dfa11·3 か月前·0 コメント

コメント

dfa11
·先月·議論
> Underengineering (I just invented this term): Too little engineering and too few patterns for a complex problem.

actually this is well-known: like a PoC that goes to production...
dfa11
·2 か月前·議論
yeah 100% agree! In some critical area, I'm forced to drop all the "good things" and pack 2 shorts into 1 int to build a tuple(short,short)...
dfa11
·2 か月前·議論
True: this compiles and the test passes today on JDK 27-jep401ea3:

  record Person(String name, Age age, Iban iban) {}

  // {"name": "SuperMario", "age": null, "iban": null}
  Person result = mapper.readValue(json, Person.class);

  assertThat(result.age()).isNull();   // passes — value class field, null
  assertThat(result.iban()).isNull();  // passes — value class field, null

  Jackson bypasses the constructor for null JSON tokens (getNullValue() short-circuits), so the
  validation in new Age(...) never runs. Both Age and Iban are value classes; both fields are null.
What do you think? Of course, there are limitations as Person cannot be flattened anymore but I guess Valhalla will ship more JEPs later?
dfa11
·2 か月前·議論
[flagged]
dfa11
·2 か月前·議論
Valhalla removes the historical performance tax on tiny domain objects. This article argues that value classes finally make domain‑safe primitives practical in real systems — strong invariants, flat layout, no wrapper overhead.

I’d love feedback from folks who’ve experimented with Valhalla or have opinions on modelling domain types in Java.
dfa11
·3 か月前·議論
[dead]
dfa11
·3 か月前·議論
this is really interesting +1 star

PS is there a plan to include hermetic builds, from local sources / git submodules?