213 points mkurz 2 hours ago 162 comments
svcrunch 2 hours ago | parent
They are useful for neural information retrieval (RAG, memory), which relies heavily on content vectorization and similarity matching using their dot products.
taspeotis 2 hours ago | parent
Who's there?
long pause
Java
lazystone 2 hours ago | parent
nsxwolf 2 hours ago | parent
azatom 2 hours ago | parent
edit: don't get me wrong, i am not here to hate java, but bc i am also ... hm necrophil :)
taspeotis 2 hours ago | parent
Now try asking, "When did Java get auto-properties?"
marginalia_nu 2 hours ago | parent
Language that runs on the explicit design philosophy of letting other languages experiment first and then incorporating their lessons learned once the dust has settled is late to implement a feature.
azatom 37 minutes ago | parent
I missed generators like that virtual threading for example.
btw: i was referring a single point when oracle bought sun and "closed java".
Betelbuddy 2 hours ago | parent
winrid 1 hour ago | parent
hobo123 39 minutes ago | parent
moomin 2 hours ago | parent
theandrewbailey 2 hours ago | parent
madduci 2 hours ago | parent
throwaway91033 1 hour ago | parent
It may be that we are shielded from edge cases because we are based on Spring, which is probably the most tested piece of software before new versions of Java are released. But it's my impression that the risk of upgrading to a new version of Java is not the same today as it was in the past. The only advantage of an LTS is that it is supported longer, so that you can postpone the upgrade if you really want. It's not as if the intermediate releases are inferior or less safe.
troupo 17 minutes ago | parent
While still being behind on most features?
kllrnohj 2 hours ago | parent
Is that actually a good thing?
But Oracle started playing a game, for better or worse, where they decided to couple the "language version" with a single specific runtime's release schedule. For example, in "Java 27" there are exactly 0 language changes and 1 minor feature addition to the TLS library.
Everything else is OpenJDK runtime internals which don't impact the language or how you use it. So if you don't use OpenJDK (such as if you use Oracle's other runtime, GraalVM), then Java 27 basically doesn't even exist at all. Skimming the past couple of C# releases, it doesn't look like Microsoft is playing that game, so the release cadence will of course be different.
hyperpape 2 hours ago | parent
Admittedly, the terminology here is almost designed to be maximally confusing, and I’ve never read a good post that laid out how everything relates.
kllrnohj 1 hour ago | parent
hyperpape 1 hour ago | parent
I do think it’s plausible this is a smaller release. Not that this was the real point of the discussion, but I think it’s still just a good idea to have more than one release a year. It keeps things moving smoothly, and lowers the cost of missing a release, which has beneficial effects.
flakes 32 minutes ago | parent
cogman10 2 hours ago | parent
The closest C# has is mono.
This sort of thing is bound to happen with that situation. Heck, it happens with C++ whenever a new C++ version comes out. Some C++11 features took years to make their way into all the compilers.
vlovich123 1 hour ago | parent
I don’t think there’s a single alternate implementation that doesn’t leverage a good chunk of openjdk somehow
pron 1 hour ago | parent
kllrnohj 34 minutes ago | parent
And of the 4 non-preview JSRs in the Java 27 release, only 1 of them is actually part of the "platform version".
The other 3 are strictly changes to Hotspot internals with no platform involvement at all. They did not change any aspect of any Java platform in any way whatsoever. That is what I'm referring to. I'm not referring to the fact that the core library, language syntax, and runtime specs are all part of the same version. I'm referring to the fact that Hotspot specific behaviors and adjustments are also branded as being part of the platform release.
Like there's no Java 27 platform spec that says that G1 is the default garbage collector. That would of course be an absurd platform spec change. But that is still somehow a "feature" of the Java 27 release according to Oracle.
pron 11 minutes ago | parent
BTW, Java is developed "code first", which means that we first work on the implementation in OpenJDK, and then extract the relevant spec changes from it.
> But that is still somehow a "feature" of the Java 27 release according to Oracle.
It's a feature of the OpenJDK JDK, which is, indeed, the Java implementation done by Oracle (with contributions from others). The language is very careful, as you can see in the announcement: "JDK 27, the reference implementation of Java 27". The Java SE 27 spec is here: https://www.jcp.org/en/jsr/detail?id=402
saghm 1 hour ago | parent
petilon 2 hours ago | parent
This is a good thing. In Java everything has multiple community offerings, so before doing anything you have to evaluate the community offerings and decide which one to go with. If you go with the wrong one you may end up having to switch at some point, and that can be painful. This happens so often that most of the time spent when using Java is doing these evaluations and comparisons. With C# you just use the one built into .NET platform. Saves a ton of time.
throwaway91033 1 hour ago | parent
All of my projects are based on Spring and I don't really have to look outside of that ecosystem. It almost acts as an aggregator of different open source solutions and often works by abstracting the functionality so that differences are not that big. I recently switched messaging providers and didn't have to change much of my code.
rwyinuse 1 hour ago | parent
hirvi74 1 hour ago | parent
That's a pretty low bar to beat.
whizzter 45 minutes ago | parent
The Core (smaller, but also properly crossplatform) project begun in 2014, fairly major rewrites with breaking changes in the new releases up until 2019 (.NET Core 3.1) and 2020 (the 5.0 release that became the official major "unification" with most parts of Framework having newer alternatives and being "complete" even if 6.0 and 7.0 patched holes).
Projects started with core 3.0/3.1 in 2019 have a pretty easy and clear upgrade path without major breaking changes up until today.
It's not JS/Node volatility, and the cleanups in the language/runtime were well worth it in hindsight (still maintaining old 4.8 applications running under IIS), also 4.8 is still nominally supported so there's no immediate stress in upgrading (There are better semantics today, but with huge projects those semantic differences, mainly no lazy-loading by default are a risk).
PaulHoule 1 hour ago | parent
There is this division of labor between systems programmers and application programmers and often we think systems programmers are better because they know more about algorithms and data structures and compilers and assembly language and such. On the other hand, application developers understand how to reconcile the mental model of managers and employees and customers with computers, reality and common sense and, once they get experienced, see the commonalities between all the run-of-the-mill bizapps that we are coding all the time.
Application programmers do a lot better at applications framework than systems programmers and make things like Ruby on Rails and Spring. Systems programmers make terrible things like ASP.NET MVC (I worked out a way to do MVC with ordinary ASP.NET, why couldn't they, with access to the platform internals?)
bob1029 11 minutes ago | parent
https://en.wikipedia.org/wiki/Log4Shell
https://learn.microsoft.com/en-us/dotnet/core/install/window...
Phelinofist 2 hours ago | parent
I mean it's short and concise and there are additional resources that provide more detail. IMHO it's not a bad thing.
Betelbuddy 2 hours ago | parent
This has nothing to do with Oracle. All good that you hear from Java in the last few years, is the great community and good old people from Sun working at Oracle.
grodriguez100 1 hour ago | parent
GrumpyGoblin 52 minutes ago | parent
hirvi74 1 hour ago | parent
kittoes 1 hour ago | parent
pjc50 1 hour ago | parent
fourseventy 1 hour ago | parent
ygra 1 hour ago | parent
whizzter 41 minutes ago | parent
Not 100% on board with the collection expression changes (I found fluent Linq chains usually more readable), but they're improving painpoints so I think it'll work out in the end hopefully.
tancop 39 minutes ago | parent
32oqa9 1 hour ago | parent
derefr 6 minutes ago | parent
I think this is because the JRE/JDK upstream releases are a bit like Linux kernel releases: all the major first-party feature development goes on in subprojects that maintain their own "living forks" during feature development, with the teams on these features doing PRs against the fork's own "main"; that "fork's main" having its own subproject maintainers who ensure a mess isn't made of it; and then those maintainers eventually polishing up that fork-main into a single big one-shot PR to upstream once the feature-as-a-whole is ready.
(Compare/contrast: the Linux kernel's mm, rt, and kvm feature development efforts.)
Because of this, the top-level "project maintainers" (i.e. the people who decide what gets merged into upstream main) aren't really the same people as these subproject people who care deeply about these new features. They want to ship stuff people want, but they personally mostly deal all day with requests to merge 1. small bugfixes, and 2. features so small that no JEP is needed.
But then, every once in a while, they have to deal with a request to merge one of these huge subproject upstreaming PRs. And sure, it's already heavily reviewed by the subproject's maintainers, who they trust. But they do still have to audit it and learn it and create a stabilized release path for it. "Handover" stuff. And that's tiring!
So, given that the toplevel project maintainers write the release notes, I'm not surprised they come off as weary about releases.
(That being said, for purely PR reasons, the toplevel maintainers could ask the subproject staff to contribute their perspective to the release notes of a release that merges their work? But this could also just-as-well be a separate blog post—which would probably be better for sharing. I don't think I've ever seen a centralized Java blog [is there one?] but I think the subproject teams do tend to have them.)
aaronax 2 hours ago | parent
arein3 2 hours ago | parent
Fingers crossed I'll manage to use null type safety in my lifetime.
karussell 2 hours ago | parent
rf15 2 hours ago | parent
pregnenolone 1 hour ago | parent
Unfortunatley without specialized generics and without the performance benefits that are supposed to come with it. They were too slow with Valhalla.
brabel 37 minutes ago | parent
Horffupolde 2 hours ago | parent
kllrnohj 2 hours ago | parent
kfir 2 hours ago | parent
topbanana 2 hours ago | parent
ndriscoll 2 hours ago | parent
eklavya 2 hours ago | parent
ndriscoll 1 hour ago | parent
The whole go team's philosophy tends to also revolve around assuming their users don't know what they're doing, which is annoying. Like an inline keyword: thinking you know better than me doesn't mean I'm not going to inline it; it means I'm going to manually write it inline myself in the code, and then think the language sucks because it's tedious, error-prone, and verbose. Or they tend to mark lots of stuff private for no reason, and e.g. with TLS 1.3 they just ignore your config because they think they know better, etc.
jeffbee 5 minutes ago | parent
Thaxll 2 hours ago | parent
As for Scala it's pretty much a dead language, no one work with it and it's impossible to find dev for it.
10 years ago I was moving Scala code back to regular Java.
weego 1 hour ago | parent
go and kotlin aren't it, gleam scratches the itch but I can't justify writing code that would impossible to hire for.
scala situation is a real shame.
ndriscoll 1 hour ago | parent
I think it used to be common to just look for smart people and assume they can run with whatever stack. Wasn't that the point of abstract algorithm questions etc. (basically an IQ test)?
jeffbee 7 minutes ago | parent
pron 1 hour ago | parent
dorkypunk 2 hours ago | parent
doublepg23 1 hour ago | parent
dorkypunk 58 minutes ago | parent
doublepg23 10 minutes ago | parent
mikert89 35 minutes ago | parent
orangesilk 2 hours ago | parent
topbanana 2 hours ago | parent
t0mas88 2 hours ago | parent
And that "team" nowadays may also consist of many AI agents. In my experience Claude Code for example works very well with a typed, slightly boring language with lots of framework and library support. Because it doesn't compile when you get something wrong, instead of getting a vague runtime issue that Claude can't always see.
BoppreH 2 hours ago | parent
I agree with the rest, but there's definitely a lot of magic in Java. This is from both what features the languages makes available (many) and how the community uses them (often). I've had so many hard-to-debug issues in Java over the years due to reflection, annotations, and bytecode manipulation shenanigans.
And another positive point for Java: checked exceptions. It's verbose, but knowing exactly in which ways a function can fail is extremely helpful for building robust applications.
msluyter 1 hour ago | parent
[1] https://www.javacodegeeks.com/2026/01/javas-checked-exceptio...
[2] https://reflectoring.io/do-not-use-checked-exceptions/
WRT magic, I've generally thought that was a result of frameworks - Spring, for example. In the past, my feeling was that these impose a sort of meta/configuration language that itself is not checkable at compile time, so you'd get weird runtime errors that are somewhat inexplicable. This was like... 2018 though, so perhaps things have improved.
voidfunc 1 hour ago | parent
Using them correctly can be great tho.
PaulHoule 1 hour ago | parent
try {
...
} finally() {
...
}
to make sure things get torn down that have to be torn down and let the exception go to the top of the unit of work and probably to whatever drives the work unit. You can probably do better than logging the raw exception and moving on to the next work unit but you can do much worse. That is, you want a default "sloppy" error handling approach that's correct that you can do without thinking and avoid other kinds of "sloppy" coding encouraged by checked exception such as catching exceptions locally without doing the right thing globally.Occasionally though I have built something really sensitive, like an authentication filter for a web site which has at least 5 ways to log in and in that I have a hierarchy of exceptions and use checked exceptions heavily to document all the ways things can go wrong and felt like "the type system really has my back here" but that is like 5% of the Java I write.
ndriscoll 1 hour ago | parent
dmux 53 minutes ago | parent
Can you explain why this is pointless? In my mind, this being a checked exception would hopefully be a hint that I should think about this failure-case and make an explicit decision whether to handle it or not. Network connection failed? Maybe I retry. Maybe I store that data somewhere else as a fall back. Isn't this similar to Go programmers needing to check if err is not nil?
mrkeen 35 minutes ago | parent
As soon as you consider retrying a network failure, you immediately need to start thinking about distributed systems failures, idempotency, and all that good stuff.
As soon as you start thinking about the above, it becomes immediately obvious that low-level calls should not be able to decide to re-run themselves.
BoppreH 1 hour ago | parent
Many times I've decided to switch from one function to another, or even an entirely new library, because the checked exceptions told me that it was doing far more than I expected, and I was not comfortable introducing those new failure modes.
It's far from perfect, one still has to handle nulls and wrapped/merged exceptions, but overall I like this language feature.
theandrewbailey 1 hour ago | parent
I've worked on Java apps that have failed in mysterious ways that no exception could explain. Meanwhile, the overhead of having to call out certain exceptions but not others in language syntax is a bit excessive.
For example, decoding a byte array (or URL encoded form field) into a UTF-8 string means handling a theoretical UnsupportedEncodingException. What the fuck? How the hell can one have a JVM that doesn't support UTF-8? Why does my code need boilerplate that will never run because there might be some broken-ass JVM out there that that doesn't support UTF-8? How did it launch a web server, safely load all the libraries, and accept a web request, and route it to my code without blowing up? "But the encoding scheme might change..." No, it won't change. It's always going to be UTF-8. It will always be UTF-8. If it's not, let it blow up.
Horffupolde 1 hour ago | parent
kccqzy 1 hour ago | parent
It took me quite a long time to accept that the recommended unit testing library manipulates bytecode so that the exception message for `assert a == b` prints the values for both.
cavoirom 1 hour ago | parent
- Annotation processing: if you know Lombok, MapStruct.
- Class loader.
- Reflection.
- Garbage collection.
pmontra 19 minutes ago | parent
marginalia_nu 2 hours ago | parent
It's stable to the point of boring, and there's no shortage of people who know the language and can work with it, it's got best in class tooling, decades worth of libraries almost all very mature. Most of the language's issues are from legacy code bases coded in a style that isn't really relevant to a greenfield project.
gentlewater 1 hour ago | parent
marginalia_nu 1 hour ago | parent
gentlewater 1 hour ago | parent
marginalia_nu 1 hour ago | parent
saghm 1 hour ago | parent
ndriscoll 1 hour ago | parent
gjadi 52 minutes ago | parent
saghm 1 hour ago | parent
what_hn 1 hour ago | parent
saghm 1 hour ago | parent
mrkeen 42 minutes ago | parent
well_ackshually 1 hour ago | parent
Otherwise, yeah, you're still in for a world of pain.
winrid 1 hour ago | parent
msgilligan 55 minutes ago | parent
If you develop a library in Java and use it from Kotlin, the built-in Kotlin null-safety will recognize the JSpecify annotations on the library.
Null-restricted types are on the roadmap. See: https://openjdk.org/jeps/8303099
wavemode 55 minutes ago | parent
misiek08 37 minutes ago | parent
wavemode 22 minutes ago | parent
I get that some people feel like it ought to be built-in to the language rather than a separate tool... but people's personal feelings are irrelevant to the lived experience of my day-to-day work, where worrying about null is truly a thing of the past.
ivan_gammel 53 minutes ago | parent
pmontra 27 minutes ago | parent
ivan_gammel 2 minutes ago | parent
foolfoolz 2 hours ago | parent
soco 2 hours ago | parent
marcosdumay 1 hour ago | parent
And if you are starting from scratch, whatever part of the ecosystem you use, I'm not optimist on its situation improving with time.
rzmmm 1 hour ago | parent
Nowadays a lot of code is written with mostly procedural style with some functional characteristics, I wouldn't use Java for that.
skeletal88 1 hour ago | parent
Why should anyone use it over Java? Ms is hostile towards its developers, it creates new versions of things, deprecates previous versions, uses confusing naming for newer versions.. etc.
hirvi74 1 hour ago | parent
I've been a .NET dev for a decade now. It's perfectly serviceable, but I wouldn't say I truly love the language anymore, but I would take it over Java any day. Entity Framework and LINQ are gifts from the Gods. I have never used an ORM that even comes remotely close.
Also, C# is big in the gaming world. I am working on a game right now, and I was not impressed with what many other languages had to offer. It seems like the kings are still C(++) and C#. Of course, Java can create games, but I would argue that is a "could vs. should" kind of decision.
Unity, Godot, Monogame, Raylib, XNA, FNA, etc. all can use or rely on C#. I have not seen Java be compatible with any of those -- except maybe Raylib? I do not know of anyone nor any games that use it though.
bitgeist 1 hour ago | parent
Microsoft is a business and will always put their business objectives first. In my opinion, they have a non-zero amount of evilness. I do not support them jamming Copilot into every available crevice. I still think they make dumb choices, like every imperfect organization. However, C# is a powerful and intuitive language, and for Microsoft shops that already run a lot of Windows and SQL Server it makes a lot of sense.
No shade to the JVM. I've mostly enjoyed my time in that space. I do believe the choice between Java and Kotlin, the wide variety of vendor JDK distributions and IDE fragmentation make the JVM stack a bit more difficult for newcomers to break into.
tester756 49 minutes ago | parent
Majority of things provided from MS instead of having to rely on 3rd party, especially nowadays when supply-chain issues are huge concern
rwyinuse 1 hour ago | parent
ulimn 1 hour ago | parent
cavoirom 1 hour ago | parent
jjice 1 hour ago | parent
I guess I'm asking this as an open question: Where are we in the "move fast vs stable" spectrum with Node these days? Definitely not rock solid, but it's moving in that direction I feel.
eranation 1 hour ago | parent
pron 1 hour ago | parent
astrodust 1 hour ago | parent
pron 1 hour ago | parent
brabel 49 minutes ago | parent
pron 37 minutes ago | parent
Mawr 27 minutes ago | parent
Doesn't bother to disclose it of course, because what, you don't check everyone's profile in every discussion to make sure they're not biased? What, you don't just know who every user on this site works for? You dummy you :)
pron 25 minutes ago | parent
akkad33 38 minutes ago | parent
pron 31 minutes ago | parent
misiek08 32 minutes ago | parent
As to Rust - we all, hopefully, agree that it’s great language, but not for some startup making websites or Mongo based, boring backends. It’s great for the stable, system level products.
pron 28 minutes ago | parent
Almondsetat 1 hour ago | parent
throwaway91033 1 hour ago | parent
pjc50 1 hour ago | parent
whartung 22 minutes ago | parent
It's not as portable as Swing, as it has some platform specific binary components to it. But it works fine on mainstream platforms. For me Swing portability is not worth giving up the FX model.
Just be aware that if you happen to bundle in the Web view component, you're basically adding WebKit to your distribution. I did this with a small project because I wanted to have a "help" screen with Markdown -> HTML. Easy, but "expensive". It simply adds a big chunk (10-20Mb) to your distribution.
(Now I have a very crude Markdown renderer for this task, which is a 100 lines code, and I'm working on a better one -- but I have yet to pull the trigger on the latest FX with its new Rich Text component, which could change everything.)
One hot tip with cross platform FX, however. Embed your fonts. The font suite is not common across the distributions, and the CSS does not honor the font fall back (i.e. if not XXX font, then YYY font), so if the runtime doesn't have your specific font, it collapses to the System font. So, embedding the fonts you use helps a lot with cross platform stability. Plenty of free fonts, I have not had a real problem with this. But it can be one of those O.o moments when you test on other platforms and encounter it the first time.
nonethewiser 1 hour ago | parent
When you want to make a game and support modding with pretty much zero development effort.
pie_flavor 57 minutes ago | parent
hobo123 43 minutes ago | parent
I guess if you use/like Intellij it's ok.
DanielHB 45 minutes ago | parent
C# LINQ also seem to be the best compromise between ORM and raw SQL queries, although I never used it myself.
I have been severely disappointed in all similar solutions for Go at least and I imagine Rust does not have something better given it has a smaller community-base.
Python and NodeJS have some very neat solutions for this stuff too, but both are "slow" dynamic languages. I personally dislike python with a passion and NodeJS stuff is extremely community-driven and therefor often unreliable. Prisma (NodeJS ORM) for example just did a major overhaul and is now pushing a completely different API.
If you are making boring REST API to SQL Database it seems like Java and C# are the best options.
mikert89 36 minutes ago | parent
pineappletooth_ 20 minutes ago | parent