Adding requireNonNull to constructors in Java is an anti-pattern. Better to check for null as early as possible and to just use Option.ofNullable for incoming data.
I'm in the No camp in terms of line count. But I still spend equal amount of time thinking about what to code. Then I write a few type signatures or definitions and ask an LLM to finish the job.
Combinators are great but they should be based on some abstraction, a common language. Just arbitrary, ad hoc higher order functions are quite difficult to reason about.
Java is also faster than Rust.
I saw @axeng200's post and was curious about Java numbers. I asked Claude to do the migration, and even though the first version was faster, it was very far from idiomatic Java. I tried to close the gap, but some compromise had to be reached in order to make this work as a drop-in replacement.
Also, some typical Java approaches were just slower. Probably both the Rust and Java implementations could probably do better in terms of performance and being closer to how idiomatic code is written by everyday developers
Stack is Java + quarkus. Beside just Java migration I tested some new feature like AOT with training introduced in Java 28 (EA build).
My main conclusion is - it's hard to beat a language that will adjust code to how your app is used. It's more about the JVM than Java.
Repo: github.com/kgonia/once-campf…
When in doubt, just use C# and ASP.NET Core.
It's blazing fast.
.NET 11 RC2 is even faster.
For me, it's the best overall major web framework - auth, config, logging, perf, modular middleware, DI, cross-plat, etc.
But I didn't expect this:
For my PL I'm thinking should I always separate type signatures from terms. Signatures are super useful especially in a pure language (like mine). I usually prefer separate signatures, but it does come with a readability cost when there are lots of args.
It's become fashionable to say:
"coding is solved"
"we don't need to care about the source code anymore"
"agents can just generate machine code"
The people who say this, aren't thinking big enough.
My rant:
Java is a pretty good language these days. What we need now are libraries and frameworks that embrace the new programming model. Oracle is trying with Helidon, but I'm not sure it makes a difference.
So you add a fancy effect system to your functional programming language. Now it's all too easy to write everything in imperative style. And imperative style doesn't encourage good functional design.
Seems like jujutsu is good for stacked PRs where you mutate (rebase) your changes between these PRs. But I always felt like rebasing & force pushing is an anti pattern.