frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Meta Superintelligence's surprising first paper

https://paddedinputs.substack.com/p/meta-superintelligences-surprising
38•skadamat•1h ago•6 comments

Rating 26 years of Java changes

https://neilmadden.blog/2025/09/12/rating-26-years-of-java-changes/
135•PaulHoule•5h ago•136 comments

The <output> Tag

https://denodell.com/blog/html-best-kept-secret-output-tag
693•todsacerdoti•15h ago•157 comments

Datastar response to allegations

https://data-star.dev/essays/greedy_developer
88•alvaroflm•2h ago•66 comments

The Murder That Made Skip Hollandsworth a True Crime Writer

https://www.texasmonthly.com/true-crime/skip-hollandsworth-new-book-she-kills/
11•speckx•5d ago•1 comments

Microsoft only lets you opt out of AI photo scanning 3x a year

https://hardware.slashdot.org/story/25/10/11/0238213/microsofts-onedrive-begins-testing-face-reco...
330•dmitrygr•5h ago•106 comments

We Found a Hidden Camera in the Bathroom of Our Airbnb

https://www.nytimes.com/2025/10/09/travel/airbnb-refund-camera-bathroom.html
14•danso•1h ago•8 comments

ElementaryOS - The thoughtful, capable and ethical replacement for Windows/macOS

https://elementary.io/
65•donutshop•3h ago•57 comments

How Apple designs a virtual knob (2012)

https://jherrm.github.io/knobs/
98•gregsadetsky•4d ago•70 comments

Testing two 18 TB white label SATA hard drives from datablocks.dev

https://ounapuu.ee/posts/2025/10/06/datablocks-white-label-drives/
132•thomasjb•5d ago•79 comments

LineageOS 23

https://lineageos.org/Changelog-30/
11•cdesai•25m ago•2 comments

Diane Keaton has died

https://www.nytimes.com/2025/10/11/movies/diane-keaton-dead.html
76•mhb•3h ago•10 comments

GNU Health

https://www.gnuhealth.org/about-us.html
316•smartmic•8h ago•91 comments

AMD and Sony's PS6 chipset aims to rethink the current graphics pipeline

https://arstechnica.com/gaming/2025/10/amd-and-sony-tease-new-chip-architecture-ahead-of-playstat...
285•zdw•19h ago•354 comments

The World Trade Center under construction through photos, 1966-1979

https://rarehistoricalphotos.com/twin-towers-construction-photographs/
182•kinderjaje•4d ago•92 comments

A Guide for WireGuard VPN Setup with Pi-Hole Adblock and Unbound DNS

https://psyonik.tech/posts/a-guide-for-wireguard-vpn-setup-with-pi-hole-adblock-and-unbound-dns/
16•pSYoniK•4h ago•4 comments

People regret buying Amazon smart displays after being bombarded with ads

https://arstechnica.com/gadgets/2025/10/people-regret-buying-amazon-smart-displays-after-being-bo...
155•croes•6h ago•75 comments

Windows Subsystem for FreeBSD

https://github.com/BalajeS/WSL-For-FreeBSD
208•rguiscard•16h ago•80 comments

Superpowers: How I'm using coding agents in October 2025

https://blog.fsck.com/2025/10/09/superpowers/
263•Ch00k•16h ago•152 comments

Japan's summers have lengthened by 3 weeks over 42 years, say resaerchers

https://english.kyodonews.net/articles/-/62626
61•anigbrowl•3h ago•8 comments

All-New Next Gen of UniFi Storage

https://blog.ui.com/article/all-new-next-gen-of-unifi-storage
45•ycombinete•3d ago•27 comments

Every LLM Is Its Own Media Channel

https://www.aivojournal.org/every-llm-is-its-own-media-channel/
3•businessmate•3d ago•1 comments

Google blocks Android hack that let Pixel users enable VoLTE anywhere

https://www.androidauthority.com/pixel-ims-broken-october-update-3606444/
6•josephcsible•37m ago•1 comments

Indonesia says 22 plants in industrial zone contaminated by caesium 137

https://www.reuters.com/sustainability/boards-policy-regulation/indonesia-says-22-plants-industri...
59•geox•4h ago•19 comments

Vibing a non-trivial Ghostty feature

https://mitchellh.com/writing/non-trivial-vibing
204•skevy•9h ago•101 comments

I built physical album cards with NFC tags to teach my son music discovery

https://fulghum.io/album-cards
547•jordanf•1d ago•188 comments

Microsoft Amplifier

https://github.com/microsoft/amplifier
205•JDEW•8h ago•125 comments

Building a JavaScript Runtime using C

https://devlogs.xyz/blog/building-a-javaScript-runtime
63•redbell•4d ago•24 comments

Beyond indexes: How open table formats optimize query performance

https://jack-vanlightly.com/blog/2025/10/8/beyond-indexes-how-open-table-formats-optimize-query-p...
17•jandrewrogers•3d ago•0 comments

A quiet change to RSA

https://www.johndcook.com/blog/2025/10/06/a-quiet-change-to-rsa/
89•ibobev•5d ago•28 comments
Open in hackernews

Rating 26 years of Java changes

https://neilmadden.blog/2025/09/12/rating-26-years-of-java-changes/
135•PaulHoule•5h ago

Comments

JanisErdmanis•4h ago
> if you wanted to store an integer in a collection, you had to manually convert to and from the primitive int type and the Integer “boxed” class

I have never worked with Java. What is this? Why would one want to have a class for an Integer?

morcus•4h ago
It's because the collection types (and generics) don't support primitives, only objects. So you been to stuff the primitives into objects to use them with a lot of the standard library.
JanisErdmanis•3h ago
That doesn't sound very pleasant.
dcminter•3h ago
Well, it was annoying until autoboxing came in.

  // Before autoboxing
  list.add(new Integer(42));

  // After autoboxing
  list.add(42);
Mostly it's a non-issue now. If you're desperately cycle/memory constrained you're likely not using Java anyway.
marginalia_nu•3h ago
You can get pretty good performance out of Java these days, so long as you know to avoid stuff like boxed primitives and the streams api, as they generally have god-awful memory locality, and generally don't vectorize well.
dcminter•3h ago
Yeah, I know there are even oddballs using it for HFT and the like - I like Java a lot, but even I find that a bit peculiar.

Edit: actually, if someone here is using it for something like that I'd love to hear the rationale...?

Arwill•3h ago
There are libraries, like fastutil, that provide collections for primitive types.
coldtea•3h ago
Either the same of this feature or always hiding the boxing (e.g. a Python int is actually a wrapper object as well, with some optimizations for some cases like interning) is the case in almost all languages.
JanisErdmanis•2h ago
I personally use Julia, which does not have such boxing issues. Rust, C, C++, and Fortran also avoid boxing like this. Perhaps Go is also free from such boxing? Python does it, that's true.
dcminter•3h ago
One of the more amusing bugs I had to figure out resulted from the fact that some of the autoboxed values get cached, resulting in peculiar behaviour when someone managed to reflectively change the boxed primitive value...

i.e. something like:

  Integer x = 42
  highlyQuestionableCode(x);
  println(x); // "24" WAT?
I'm a fan of JEP-500...

https://openjdk.org/jeps/500

raspasov•3h ago
I think your intuition is correct: you probably don’t.

That’s also very likely changing. Lookup “project Valhalla”. It’s still a work in progress but the high level goal is to have immutable values that “code like a class, work like an int”.

PS When I say “changing”: it’s being added. Java tries hard to maintain backward compatibility for most things (which is great).

iceboundrock•3h ago
Primitive variables in Java, such as `int`, `boolean`, and `double`, store their actual values directly in memory. When they are local variables inside a method, this memory is typically allocated on the thread's stack. These primitives do not have the structure or overhead of an object, including the object header used by the Garbage Collector (GC) to manage heap-allocated objects.

If a primitive value must be treated as an object (e.g., when stored in a Java Collection like ArrayList or when passed to a method that requires an object), Java uses a process called `boxing` to wrap the primitive value into an instance of its corresponding Wrapper class (e.g., Integer, Boolean, Double). These Wrapper objects are allocated on the heap and do possess the necessary object header, making them subject to the GC's management.

wpollock•2h ago
Aside from this, having such a class provides a convenient place to hold all the int utility functions, and the same for the other primitive types.
iceboundrock•4h ago
It appears that most of the good changes are imported from C#.
sjrd•3h ago
Or Scala. Or Kotlin. Or any of the other languages that had most of these features years if not decades before Java. ;)
marginalia_nu•3h ago
Yeah that's very much an explicit design philosophy of Java, dating way back. Let other languages experiment, and adapt what proves useful.

It hasn't worked out in terms of delivering perfect language design, but it has worked out in the sense that Java has an almost absurd degree of backward compatibility. There are libraries that have had more breaking changes this year than the Java programming language has had in the last 17 releases.

agos•2h ago
What other language made them think checked exceptions were a good idea?
ivan_gammel•54m ago
Some inspiration came from C++, Modula-3, CLU etc. (note, inspiration, not validation of the idea)

They exist since v1, which had very different philosophy than Java of 2010s-2020s. 1990s were an interesting time in language design and software engineering. People started reflecting on the previous experiences of building software and trying to figure out how to build better, faster, with higher quality. At that time checked exceptions were untested idea: it felt wrong not to have them based on previous experience with exceptions in C++ codebases, but there were no serious arguments against them.

hocuspocus•43m ago
I assume it was the other way around, a slight twist to exceptions, only enforced by the compiler (the JVM doesn't care about checked/unchecked) probably seemed a cheap and reasonable way to implement explicit error handling. Given that Java ergonomics of the time didn't offer any convenient and performant way to return multiple values instead.
coldtea•3h ago
Most of original C# was imported from Java, so there's that...
dkarl•4h ago
Definitely underrates the impact of annotations. I'm personally not a fan of the way annotations are used to implicitly wire together applications, but I have to admit the impact. Maybe 5/10 is fair in light of the wide range of positive and extremely negative ways annotations can be used.

So many of these features were adopted after they were proven in other languages. You would expect that since Java took such a slow and conservative approach, it would end up with extremely polished and elegant designs, but things like streams ended up inferior to previous developments instead of being the culmination. Really disappointing. Java is now a Frankenstein's monster with exactly as much beauty and charm.

dhosek•3h ago
I used to joke that the direction spring was heading was that you’d have an application be a boilerplate main method with a dozen lines of annotations. Then I actually encountered this in the wild: we had an app that sent updates from db2 to rabbitmq, and the application literally was just configuration via annotations and no actual Java code other than the usual spring main method.
bdangubic•3h ago
this is exactly why spring succeeded. I need to run a scheduled job, @EnableScheduling then @Scheduled(cron = “xxxxxx”) - done. I need XYZ, @EnableXYZ the @XYZ… sh*t just works…
vbezhenar•3h ago
Yeah, it works until it isn't. And they good luck debugging it. I'd prefer simple obvious linear code calling some functions over this declarative magic any day.

    cronService.schedule("xxx", this::refresh);
This isn't any harder than annotation. But you can ctrl+click on schedule implementation and below easily. You can put breakpoint and whatnot.
bdangubic•2h ago
never had any issues debugging as I am never debugging the scheduler (that works :) ) but my own code.

and what exactly is “cronService”? you write in each service or copy/paste each time you need it?

alex_smart•1h ago
You can write your own libraries?

My goodness. What a question!

bdangubic•34m ago
you write your own database driver? encryption?
skeletal88•2h ago
Then you need to deploy it on multiple nodes and neex to make sure it only runs once for each run of the cron, etc.
bdangubic•2h ago
while not working on out of the box clustered this is trivial issue to address
taftster•2h ago
And then I realize I need to change that schedule. And would like to do it without recompiling my code. Oh, and I need to allow for environment specific scheduling, weekdays on one system, weekends on others. And I need other dependencies that are environment specific.

I much prefer Spring's XML configuration from the old days. Yeah, XML sucks and all that. But still, with XML, the configuration is completely external from the application and I can manage it from /etc style layouts. Hard coding and compiling in dependency injection via annotations or other such behaviors into the class directly has caused me grief over the long term pretty much every time.

nunobrito•1h ago
The only real-world usage I see for annotations are in GSON (the @Expose) and JUnit with @Test.

Never really came across with any other real cases where it solves a pressing issue as you mention. Most times is far more convenient to do things outside the compiled code.

bdangubic•35m ago
all trivial things you are listing, every single one…
9dev•3h ago
Is that strictly bad, though? Being able to run an enterprise service by setting configuration values declaratively, and get all the guarantees of a well-tested framework, seems like a pretty good thing.

Yes, it’s weird how that’s still Java, but using standard components and only using code as glue where it’s absolutely necessary seems very similar to other engineering disciplines to me.

SkiFire13•2h ago
I think the general adversity against this specialized configurations is that they often tend to be fairly limited/rigid in what they can do, and if you want to customize anything you have to rewrite the whole thing. They effectively lock you into one black box of doing things, and getting out of it can be very painful.
2muchcoffeeman•53m ago
Spring boot just provides what they think are reasonable defaults and you provide some specifics.

You can always inject your own implementation if needed right?

dhosek•48m ago
Oh, I think it’s quite wonderful really. There are cases where the limited nature of some configuration-based things ends up being a mess (one that comes to mind is a feature in Spring Data where you can extend a DAO bean into a rest service through annotations, but it turns out that this feature (at least when I last tried working with it), is so rigid as to be nearly useless in actual practice. But our codeless application was a bit of brilliance, I think.
tormeh•3h ago
It's seriously puzzling. I just don't get how it's possible to look at what so many others have done better, and somehow design something worse. For what reason? Consistency with the rest of the language, possibly? But is that really so important. Do they just not want to tackle certain parts of the compiler?
dcminter•3h ago
Some of the weirder choices have been the result of a desire to avoid making breaking changes to JVM bytecode.

Also there was a long period when changes were very lumpy - it could be multiple years for a feature to make it into the release, and anything that might screw up other features got a lot of pushback. Then other conventions/tools emerged that reduced the urgency (e.g. the Lombok stuff)

Edit: I should add that it's now on a fixed 6-monthly release cycle which IMO works much better.

rzwitserloot•2h ago
OpenJDK redesigns massive swaths of the compiler every other month.

The true explanation, at least the way OpenJDK says it, is that designing language features is more complex than a casual glancer can fathom, and there's 30 years of "Java is in the top 5 most used languages on the planet, probably #1 especially if focussing on stuff that was meant to be supported for a long time" to think about.

From personal experience, essentially every single last "Just do X to add (some lang feature) to java; languages A and B do it and it works great!" would have been bad for java. Usually because it would cause a 'cultural split' - where you can tell some highly used library in the ecosystem was clearly designed before the feature's introduction.

Even if you introduce a new feature in a way that doesn't break existing code, it's still going to cause maintainability headaches if you've cornered the pillars of the ecosystem into total rewrites if they want to remain up to date with the language. Because they will (or somebody will write an alternative that will) and you've _still_ 'python 2 v python 3'd the language and split the baby in the half.

For what its worth, I think the OpenJDK team doesn't take this seriously enough, and a number of recently introduced features have been deployed too hastily without thinking this through. For example, `LocalDate`, which has 'this should be a record' written all over it, is not a record. Or how the securitymanager is being ditched without replacements for what it is most commonly used for here in the 2020s. (To be clear: Ditching it is a good idea, but having no in-process replacement for "let me stop attempts to access files and shut down the JVM, not for security purposes but simply for 'plan B' style fallback purposes" - that's a bit regrettable).

I'm nitpicking on those points because on the whole OpenJDK is doing a far better job than most languages on trying to keep its ecosystem and sizable existing codebase on board _without_ resorting to the crutch of: "Well, users of this language, get to work refactoring everything or embrace obsoletion".

halffullbrain•27m ago
But ... LocalDate predated records by 6 years?

Eventually, I guess there'll be backwards compatible "pattern extractors" functionality retrofittable to existing "record-like" classes. This has been hinted at on several occasions.

MBCook•3m ago
Records are great, but objects work.

Date flat out doesn’t. We needed something in the standard library to fix that. It should’ve happened long before it did.

vbezhenar•3h ago
I don't really feel that Java uses proven features.

For example they used checked exceptions. Those definitely do not seem like proven feature. C++ has unchecked exceptions. Almost every other popular language has unchecked exceptions. Java went with checked exceptions and nowadays they are almost universally ignored by developers. I'd say that's a total failure.

Streams another good example. Making functional API for collections is pretty trivial. But they decided to design streams for some kind of very easy parallelisation. This led to extremely complicated implementation, absurdly complicated. And I've yet to encounter a single use-case for this feature. So for very rare feature they complicated the design immensely.

Modules... LoL.

We will see how green threads will work. Most languages adopt much simpler async/await approach. Very few languages implement green threads.

rzwitserloot•2h ago
> For example they used checked exceptions.

Those are from java 1.0 and thus don't appear to be relevant to the part of the discussion I think this part of the thread is about (namely: "Why doesn't java crib well designed features from other languages?").

> Java went with checked exceptions and nowadays they are almost universally ignored by developers.

They aren't.

Note that other languages invented for example 'Either' which is a different take on the same principle, namely: Explicit mention of all somewhat expectable alternative exit conditions + enforcing callers to deal with them, though also offering a relatively easy way to just throw that responsibility up the call chain.

The general tenet (lets lift plausible alternate exit conditions into the type system) is being done left and right.

jayd16•1h ago
I suppose you could actually solve it by having a promise that catches the exception like your suggesting with an either result. The C# Task API can do this. It has it's own headaches where now the developer has to pay attention to observing every exception.

Java could do something similar but they have enough promise types already.

JavierFlores09•2h ago
Stuart Marks and Nicolai Parlog recently had a discussion about checked exceptions in the Java channel [0]. In short, while they mentioned that there are certainly some things to improve about checked exceptions, like the confusing hierarchy as well as the boilerplate-y way of handling them, they're not necessarily a failed concept. I do hope they get to work on them in the near future.

0: https://www.youtube.com/watch?v=lnfnF7otEnk

vbezhenar•1h ago
They are absolutely failed concept in Java. Every first popular library uses unchecked exceptions, including famous Spring. Java streams API does not support checked exceptions. Even Java standard library nowadays includes "UncheckedIOException". Kotlin, Scala: both languages grown from JVM and do not support checked exceptions.
dkarl•1h ago
You're absolutely right about checked exceptions. However, I think they're an exception (forgive me) from the pattern of Java mostly sticking to the strategy of, we can build a practical, industrial, reasonably performant language that has all these nice bits from other languages: garbage collection, portable bytecode, no pointer arithmetic, collections in the standard library, etc.

I think streams are a great example of what I was saying about Java failing to take advantage of coming last. Scala (probably among others, but Scala was right there on the JVM) had already demonstrated that it was possible to enable simple, readable code for simple use cases, while also enabling complex and powerful usage. And the experience of Scala had shown that there's little demand for parallel collections outside of extremely niche use cases where people tend to use specialized solutions anyway. Somehow Java, with this example staring them in the face, managed to get the worst of both worlds.

torginus•3h ago
which is kinda horrifying - it means the framework designers didn't find the language powerful enough to express app logic, and hotglued their own custom arbitrary behavior on top of it.

Clear language code should be endeavor to be readable/understandable when printed on a sheet of paper by anyone, acceptable code should be understandable by anyone who knows a bit about the technologies and has some IDE support.

Garbage code is what you have when the code in question is only understandable when you actually run it, as it uses arbitrary framework logic to wire things together based on metadata on the fly.

Groxx•1h ago
people have been gluing other languages on top of languages practically forever - it's a DSL.

no single language is ideally suited for every situation, it's not inherently a sign of failure that someone makes a DSL.

and since annotations are part of the language, this is still all "the language is flexible enough to build the framework [despite being wildly different than normal code]" so I don't think it even supports that part.

rzwitserloot•3h ago
That's not how the OpenJDK sees things. They tend to think that the features they deliver are at best mildly informed by other languages. Not out of some sense of hubris, but out of a sense of pragmatics: Simply copy and pasting features from other languages into java - that would produce a frankenstein.

For example, java is somewhat unique in having lambda syntax where the lambda *must* be compile-time interpretable as some sort of 'functional type' (a functional type being any interface that defines precisely 1 unimplemented method). The vast, vast majority of languages out there, including scala which runs on the JVM, instead create a type hierarchy that describe lambdas as functions, and may (in the case of scala for example) compile-time automatically 'box'/'cast' any expression of some functional type to a functional interface type that matches.

Java's approach is, in other words, unique (as far as I know).

There was an alternate proposal available at the time that would have done things more like other languages does them, completely worked out with proof of concept builds readily available (the 'BGGA proposal'). The JVM would autogenerate types such as `java.lang.function.Function2<A, B, R>` (representing a function that takes 2 arguments, first of type A second of type B, and returns a value of type R), would then treat e.g. the expression:

`(String a, List<Integer> b) -> 2.0;`

As a `Function2<String, List<Integer>, Double>`, and would also 'auto-box' this if needed, e.g. if passing that as the sole argument to a function:

``` void foo(MyOperation o) {}

interface MyOperation { Double whatever(String arg1, List<Integer> arg2); } ```

This proposal was seriously considered but rejected.

The core problem with your comment is this:

Define the terms "polished" and "elegant". It sounds so simple, but language features are trying to dance to quite a few extremely different tunes, and one person's 'elegance' is another person's 'frankensteinian monster'.

The same mostly goes for your terms "beauty" and "charm", but, if I may take a wild stab in the dark and assume that most folks have a very rough meeting of the minds as to whatever might be a "charming" language: I know of no mainstream long-term popular languages that qualify for those terms. And I think that's inherent. You can't be a mainstream language unless your language is extremely stable. When you're not just writing some cool new toy stuff in language X - you're writing production code that lots of euros and eyeballs are involved in, and there's real dependence on that software continuing to run, then you __must__ have stability or it becomes extremely pricey to actually maintain it.

With stability comes the handcuffs: You need to use the 'deprecation' hammer extremely sparingly, essentially never. And that has downstream effects: You can't really test new features either. So far I have not seen a language that truly flourishes on the crutches of some `from future import ...` system. That makes some sense: Either the entire ecosystem adopts the future feature and then breaking _that_ brings the same headaches, or folks don't use these features / only for toy stuff, and you don't get nearly the same amount of experience from its deployment.

Said differently: If java is a frankenstein, so is Javascript, C#, Python, Ruby, Scala, and so on. They have to be.

I'd love to see a language whose core design principles are 100% focussed on preventing specifically that. Some sort of extreme take on versioning of a language itself that we haven't seen before. I don't really know what it looks like, but I can't recall any language that put in the kind of effort I'd want to see here. This is just a tiny sliver of what it'd take:

* The language itself is versioned, and all previous versions continue to be part of the lang spec and continue to be maintained by future compilers. At least for a long time, if not forever.

* ALL sources files MUST start with an indication about which version of the language itself they use.

* The core libraries are also versioned, and separately. Newer versions are written against old language versions, or can be used by source on old language versions.

* The system's compilers and tools are fundamentally operating on a 'project' level granularity. You can't compile individual source files. Or if you can, it's because the spec explains how a temporary nameless project is implied by such an act.

* All versions ship with a migrator tool, which automatically 'updates' sources written for lang ver X to lang ver X+1, automatically applying anything that has a near-zero chance of causing issues, and guiding the programmer to explicitly fixing all deprecated usages of things where an automated update is not available.

* The language inherently supports 'facades'; a way for a library at version Y to expose the API it had at version X (X is older than Y), but using the data structures of Y, thus allowing interop between 2 codebases that both use this library, one at version X and one at version Y.

That language might manage the otherwise impossible job of being 'elegant', 'simple', 'mainstream', 'suitable for serious projects', and 'actually good'.

nine_k•2h ago
Absolutely. It seems that the author never touched Spring, for instance, or a dependency-injection framework of any kind. Annotations allow to do things in a completely different way, removing tons of boilerplate.

I'd give annotations 9/10 at least.

(And I lost the interest in the rest of the article, given such a level of familiarity with the subject matter.)

Groxx•1h ago
and that's before even touching on the compilation steps they can add, which are a pluggable codegen and macro system that is also integrated into IDEs, which is completely missing from almost every other language.
jayd16•1h ago
Good stuff. If that excites you, check out Roslyn source generators too.
__float•53m ago
My experience using Dagger (2) was so unpleasant that it really soured me on the possible uses of this feature.

I understand the benefits of dependency injection, but to be totally honest I'm more likely to take the Go-style approach of wiring it all up manually, even if it's a bit of extra boilerplate. The indirection and abstractions built up in DI frameworks is rarely worth it IMO.

malfist•46m ago
Dagger is an absolutely pain in the ass. Its also damn good. Once you understand the archane syntax of their error messages its a lot easier (but still not easy) to use.

Harder than spring, but less magic than spring

jayd16•1h ago
The ratings are really all over the place. Jshell is a 6/10? What is the rubric?
Supermancho•4h ago
Can someone explain why developers like var?
pgwhalen•3h ago
It reduces (often repetitive) visual noise in code, which can make it more readable. I wouldn’t recommend using it in all cases, but it’s a good tool to have.
Traubenfuchs•3h ago
It‘s a harmful code smell: It often obfuscates the type, forcing you to actively check for the type and should not be used.
Supermancho•3h ago
This is what it looks like to me. If you wanted to do this, why not use a scripting language where you can use this kind of practice everywhere? In Java, I don't expect to have to look up the return type of something to discover a variable type. Graciously, I can see how you can save rewriting the Type declaration when it's a function return you want to mutate.

Generally, you save some keystrokes to let other people (or future you) figure it out when reading. It seems like bad practice altogether for non trivial projects.

guax•2h ago
Modern IDEs will show you the type of anything at all times. I do not understand your point unless you're doing raw text editing of Java source.

Those keystrokes are not just saved on writing, they make the whole code more legible and easier to mentally parse. When reading I don't care if the variable is a specific type, you're mostly looking whats being done to it, knowing the type becomes important later and, again, the IDE solves that for you.

Supermancho•32m ago
> Modern IDEs will show you the type of anything at all times. I do not understand your point unless you're doing raw text editing of Java source.

The word "String" "Integer" et al. + "var" is too much real estate for being explicit. Sometimes, I'm looking at the decompiled source from some library that doesn't have a source package available.

> Those keystrokes are not just saved on writing, they make the whole code more legible and easier to mentally parse.

This is incorrect. Repeating it doesn't make it true. For trivial code (<10 lines) probably seems fine at the time. Lots of bad practices start with laziness.

Changing practice because an author thinks a function is small enough when it was written, is a recipe for unclean code with no clear guidelines on what to use or expect. Maybe they rather put the onus on a future reader; this is also bad practice.

newAccount2025•3h ago
Your IDE can do that?
a57721•2h ago
It is used for things like "Foo x = new Foo()" where the type is obvious.
tofflos•3h ago
It's terse and it lines up the variable names.
flykespice•3h ago
It's another thing they adopted from Kotlin, since Kotlin is supposed to be a "better java". Now Java is retroactively adopting Kotlin freatures.
speed_spread•3h ago
Kotlin didn't invent type inference, it's a feature from ML.
speed_spread•3h ago
It's called type inference and it's the way things should be. You get the same types but you don't have to spell them out everywhere. Java doesn't even go all the way, check OCaml to see full program inference.
miningape•3h ago
OCaml's type inference is truly amazing, makes it such a delight to write statically typed code - reading it on the other hand...

But I think that's easily solved by adding type annotations for the return type of methods - annotating almost anything else is mostly just clutter imo.

Supermancho•3h ago
Annotations would be a substitute for writing the return type. Extra code for a shortcut seems like the worst solution.
N70Phone•3h ago
Previously (or if you simply don't use var), a lot of java code takes the form of

  BeanFactoryBuilder builder = new BeanFactoryBuilder(...);
This is just straight up a duplicate. With generics, generic parameters can be left out on one side but the class itself is still duplicated.
guax•2h ago
To me var is what makes modern java somewhat readable and more bearable. It was always a joke that it takes too long to write anything in java because of the excessive syntax repetitions and formalities. To me that joke is heavily based on a reality that modern Java is tackling with this quality of life features.
whartung•2h ago
I get the attraction to var, but I, personally, don't use it, as I feel it makes the code harder to read.

Simply, I like (mind, I'm 25 year Java guy so this is all routine to me) to know the types of the variables, the types of what things are returning.

  var x = func();
doesn't tell me anything.

And, yes, I appreciate all comments about verbosity and code clutter and FactoryProxyBuilderImpl, etc. But, for me, not having it there makes the code harder for me to follow. Makes an IDE more of a necessity.

Java code is already hard enough to follow when everything is a maze of empty interfaces, but "no code", that can only be tracked through in a debugger when everything is wired up.

Maybe if I used it more, I'd like it better, but so far, when coming back to code I've written, I like things being more explicit than not.

nunobrito•1h ago
Yes, well expressed. For that case using var is not a wise approach.

It does help when writing:

    var x = new MyClass();
Because then you avoid repetition. Anyways, I don't ever use "var" to keep the code compatible with Java-8 style programming and easier on the eyes for the same reasons you mention.
CrimsonRain•1h ago
1. Just because you can use var in a place, doesn't mean you should. Use it where the type would be obvious when reading code like

  var myPotato = new PotatoBuilder.build();
not like

  var myFood = buyFood();
where buyFood has Potato as return type.

2. Even if you don't follow 1, IDEs can show you the type like

  var Potato (in different font/color) myFood = buyFood();
mi_lk•1h ago
I have the opposite feeling. var makes it easier to write but harder to read/review. Without var you know the exact type of a variable without going through some functions for example
haunter•3h ago
I'm sorry, please don't hate me (I'm tired and don't have anything better to do) https://files.catbox.moe/ge4el3.png
rvitorper•1h ago
Dude, this is awesome
alex_smart•1h ago
Why so much hate for modules? They seem to be almost universally disliked by everyone on this thread and I don't understand why.
ivan_gammel•1h ago
Modules are weird. In Java world there exists consensus on dependency management via Maven-style repositories (Maven Central is the primary distribution channel) and all tools support it. You handle your dependency tree outside of your code and just import packages from libraries available on classpath. It’s possible to continue doing that that without using modules, so the case for using them is still unclear to many people. Where the actual hate may have come from is an old story with migration from Java 8 to Java 9, where modules hidden the access to certain internal APIs, breaking some libraries which relied on them, making that migration painful. Today their value is probably 0/10, but there’s no reason to hate.
hashmash•1h ago
Directly or indirectly many (or most) projects ended up depending on something which was using an unsupported backdoor API because it provided a marginally useful capability. The module system restricted access to these APIs and everything stopped working, unless you added some magic command line arguments to gain access again.

So for most people, the initial impression of modules is negative, and then they just decided to rule the feature out completely. This has created a sea of useless criticism, and any constructive criticism is hardly observed. Improvements to module configuration (combine it with the classpath), would go a long way towards making modules "just work" without the naysayers getting in the way.

sothatsit•40m ago
They are only useful for a small group of people, and their addition broke/complicated lots of people's builds in non-trivial ways.
harladsinsteden•3h ago
I don't know what to make of this list...

Very strange reasoning and even stranger results: Streams 1/10?! Lambdas (maybe the biggest enhancement ever) a mere 4/10?!

Sorry, but this is just bogus.

tofflos•3h ago
I will make any excuse to use Streams but understand the negativity. They are difficult to debug and I feel the support for parallelism complicated, and in some cases even crippled, the API for many common use cases.
nunobrito•1h ago
I'm that author. It has been more than a decade and still won't use streams nor lambdas. Makes the code too difficult to write and debug for me.

Really prefer to have more lines of code and understanding very clearly what each one is doing, than convoluting too many instructions on a single line.

foresterre•8m ago
They're a bit verbose, the interfaces are slightly convoluted and some basic operations are missing from the standard library.

It's also a little convoluted to work with different types of data.

For this one, I wish they would have taken a bit more inspiration from other languages and spent the time to make it more readable.

That said, I generally like streams a lot, and they do reduce the amount of branching, and having less possible code execution points makes testing easier too.

Arwill•3h ago
-10 for modules is fair, only 4 for lambdas is not. My programming style changed after using lambdas in Java, even when using a different programming language later that doesn't have lambdas as such.
marginalia_nu•3h ago
I think the author is sleeping on Java assertions.

I really like the feature, and it's really one of the features I feel Java got right.

The syntax is very expressive, and they can easily be made to generate meaningful exceptions when they fail.

It's also neat that it gives the language a canonical way of adding invariant checks that can be removed in production but run in tests or during testing or debugging (with -da vs -ea).

You could achieve similar things with if statements, and likely get similar performance characteristics eventually out of C2, but this way it would be harder to distinguish business logic from invariant checking. You'd also likely end up with different authors implementing their own toggles for these pseudo-assertions.

rwmj•3h ago
I'm quite surprised that he said asserts are not found in production code. Is that really so? I rarely write Java, but in C code we use asserts (in production code) all the time. It's not uncommon for functions to contain 2 or 3 asserts.
dcminter•2h ago
I very rarely see assertions in "real" Java code; I think the author is right - in fact the place I see them the most often is in unit tests where they've been used by mistake in place of an assertion library's methods!

I don't know why they're not more popular.

nunobrito•1h ago
Good conversation, I had no idea what assertions are beyond JUnit.
marginalia_nu•2h ago
If you're only doing like CRUD endpoints, they may be less useful, but that's hardly the extent of Java production code. I certainly use asserts in production code quite a lot in Java, though the use biases toward more low level functions, rarely in high level application logic.
brap•2h ago
What are the pros of making this a keyword vs just a standard function?
dcminter•51m ago
You can disable them at runtime (e.g. in prod) to avoid the performance overhead once you're satisfied the codebase is thoroughly enough tested.

For some things like requiring arguments to be non-null static checks with annotations have superseded them (in a confusing way inevitably - I think there are three different common non-nullness annotations).

__float•48m ago
I'm wondering this, too.

There's Guava and its Preconditions class[0] that is approximately as terse and I find to be more helpful than everything-is-an-AssertionError.

[0] https://guava.dev/releases/14.0/api/docs/com/google/common/b...

hashmash•46m ago
At the time the feature was added, there was no way to make a parameter to a function be lazily evaluated. Something like `assert(condition, "error: " + stuff)` would eagerly concatenate the string even when the condition is always true (which it should be). Nowadays, the error parameter can be specified as a lambda, which can potentially be optimized to be just as cheap as the existing assert feature.
marginalia_nu•44m ago
The pros are that it can generate better error messages, without putting that responsibility on the programmer. Something that would otherwise require a preprocessor or some form of metaprogramming.
zylepe•3h ago
I haven’t used markdown in javadoc yet but this seems like at least 3/10? I often want to put paragraphs or bulleted lists in javadoc and find myself wanting to use markdown syntax for readability in the code but need to switch to less readable html tags for tooling to render it properly.
ronyeh•1h ago
I hate using html in comments.

Markdown in javadoc is at least 7/10 for me. Improves comment readability for humans while allowing formatted javadocs.

rsynnott•3h ago
I feel this is overly harsh on Collections. You have to take into account just how awful that which it replaced was.

> Java Time: Much better than what came before, but I have barely had to use much of this API at all, so I’m not in a position to really judge how good this is.

Again, it is hard to overstate just _how_ bad the previous version is.

Though honestly I still just use joda time.

wpollock•2h ago
>Again, it is hard to overstate just _how_ bad the previous version [of Java time] is.

The original Java Time classes were likely a last-minute addition to Java. They were obviously a direct copy of C language time.h. It feels as if the Java team had a conversation like this: "Darn, we ship Java 1.0 in a month but we forgot to include any time functions!" "Oh no! We must do something!" "I know, let's just port C time.h!"

zkmon•3h ago
Applets (Java 1.1 - that's where I started),

Servlets (Together with MS ASP, JSP/Servlets have fuelled the e-commerce websites)

I think Java dominated the scene mostly because of its enterprise features (Java EE) and the supporting frameworks (Spring etc) and applications (Tomcat, Websphere, Weblogic etc) and support from Open source (Apache, IBM)

foolfoolz•3h ago
the biggest things to change java have been type inference, lambdas, records, streams (functional ops on collections), and pattern matching. these are all must-have features for any modern programming language. at this point any language without these features will feel old and legacy. it’s impressive java was able to add them all on decades after release, but you do feel it sometimes
newAccount2025•3h ago
For my part, returning to Java a couple years back after 15+ years away, streams + var/val were my favorite discoveries.
sedro•3h ago
Autoboxing's evil twin, auto-unboxing should knock the score down a few points.

  Integer a = null;
  int b = 42;
  if (a == b) {} // throws NullPointerException
dcminter•2h ago
Or my favourite...

  Short w = 42;
  Short x = 42;
  out.println(w == x); // true
  Short y = 1042;
  Short z = 1042;
  out.println(y == z); // false
prein•2h ago
Once, after we had an application go live, we started getting reports after a few hours that new users were unable to log in.

It turns out, somewhere in the auth path, a dev had used `==` to verify a user's ID, which worked for Longs under (I believe) 128, so any users with an ID bigger than that were unable to log in due to the comparison failing.

sedro•1h ago
That's another gotcha-- interning of strings and boxed primitives.

Are there linters for this sort of thing? I don't write Java much any more.

dcminter•57m ago
> Are there linters for this sort of thing?

Yes and they're pretty good so it's rarely an issue in practice. Using == on object references will indeed usually get you yelled at by the linter.

hashmash•39m ago
If JEP 401 is ever delivered (Value Classes and Objects), then this sort of problem should go away.
commandersaki•1m ago
I'm not much of a PL nerd, what should it do?
tombert•3h ago
Interesting; I actually have grown pretty fond of NIO.

I will acknowledge that the interface is a bit weird, but I feel like despite that it has consistently been a "Just Works" tool for me. I get decent performance, the API is well documented, and since so many of my coworkers have historically been bad at it and used regular Java IO, it has felt like a superpower for me since it makes it comparatively easy to write performant code.

Granted, I think a part of me is always comparing it to writing raw epoll stuff in C, so maybe it's just better in comparison :)

simonklee•3h ago
java.util.Date and java.util.Calendar are the two packages I remember struggling with as a new programmer. Which I guess is solved with java.time after Java 8.
b_e_n_t_o_n•3h ago
I haven't written much Java but I am learning Kotlin and I really appreciate the language and the whole JVM ecosystem. Yeah yeah, Gradle is complicated but it's waaaaay easier to figure out than my adventures with Cmake, and when I read Java code there is a certain comfort I feel that I don't get with other languages, even ones I'm experienced with like Go. Java feels a bit like a stranger I've known my whole life, same with Kotlin. Perhaps despite all its flaws, there is a certain intrinsic quality to Java that has helped make it so popular.
dcminter•47m ago
Maven was peak Java build tool. I detest Gradle. Some people just hate XML enough to doom us all.
MarkMarine•3h ago
I’m sure there are better ways to do streams on the JVM, scala being a great example, but however imperfect the implementation is streams are such a net positive I can’t imagine the language without them. I pine for the streams API when I write go.
AbuAssar•3h ago
so java 22, 23, 24 are all released in 2024?
dcminter•2h ago
No, it's a 6 month release cadence. You might be confusing the initial release with a point release which are less regular. Edit: oh, my bad, I see the article author had the wrong year for 24.

  22 was March 2024
  23 was September 2024
  24 was March 2025
  25 was September 2025
This is much better than the old "release train" system where e.g Java 5 and Java 6 were released in Sept 2004 and Nov 2006 respectively!
linuxhansl•2h ago
Didn't Java 1.3 (Sun's JDK) introduce the JIT? I remember talking to colleagues about what a joke Java performance was (we were working in C++ then). And then with Java 1.3 that started to change.

(Today, even though I still C++, C, along with Java, I'll challenge anyone who claims that Java is slower then C++.)

hashmash•31m ago
The first official JIT became available in JDK 1.1, in 1997. The Symantec JIT was available as an add-on sometime in mid 1996, just a few months after JDK 1.0 was released. Even better performance was possible with GCJ, available in 1998.

The release of HotSpot was in 1999, and because default with JDK 1.3 in 2000. It took JIT compilation to the next level, making tools like GCJ mostly obsolete.

brap•2h ago
Wow I can’t believe try with resources is so old! I’ve been working with Java for years and only learned this exists recently, I thought it must be relatively new. 14 years!
dcminter•45m ago
It was such a lifesaver for doing raw database stuff. The boilerplate for making sure Connection, PreparedStatement, ResultSet and so on were all released properly was a huge pain before that.
travisgriggs•2h ago
Ah Java. The language I never got to love. I came of coding age during the “camps” era of object oriented stuff: Eiffel, Smalltalk, CLOS, C++, etc. Java, from 95ish to oh 98ish, was like a giant backdraft. Completely sucked the air out of the room for everything else.

Does anyone remember the full page ads in WSJ for programming language, that no on quite yet knew what it really was? So my formative impressions of Java on were emotional/irrational, enforced by comments like:

“Of Course Java will Work, there’s not a damn new thing in it” — James gosling, but I’ve always suspected this might be urban legend

“Java, all the elegance of C++ syntax with all the speed of Smalltalk” - Kent Beck or Jan Steinman

“20 years from now, we will still be talking about Java. Not because of its contributions to computer programming, but rather as a demonstration of how to market a language” — ??

I can code some in Java today (because, hey, GPT and friends!! :) ), but have elected to use Kotlin and have been moderately happy with that.

One thing that would be interesting about this list, is to break down the changes that changed/evolved the actual computation model that a programmer uses with it, vs syntactic sugar and library refinements. “Languages” with heavy footprints like this, are often just as much about their run time libraries and frameworks, as they are the actual methodology of how you compute results.

rr808•1h ago
Java is great, Spring ruined the platform.
__float•43m ago
As someone who has used Java pretty extensively for a few years (but in an environment where Spring was forbidden), why is that?
taspeotis•1h ago
Which release did they add the URL class that checks for equality by connecting to the internet? 10/10
__float•44m ago
That mis-feature has been present since Java 1.0, so (as with checked exceptions mentioned above) it's not entirely within the scope of this post.
pixelmonkey•1h ago
A cool thing about Doug Lea's java.util.concurrent (received a 10/10 rating here) is that its design also inspired Python's concurrent.futures package. This is explicitly acknowledged in PEP 3148[1] (under "Rationale"), a PEP that dates back to 2009.

[1]: https://peps.python.org/pep-3148/

swuecho•22m ago
That is why I think of java when using python's concurrent.future package.
nunobrito•1h ago
Fully agree with most votings but 3/10 text blocks?!

That has got to be one of the most useful recent features. :-)

The pleasure of just copying and paste text in plain ASCII that looks as intended rather than a huge encoded mess of "\r\n"+ concatenations.

But ok, I'm just an ASCII art fan. ^_^

w10-1•1h ago
It's nice to review the features, but the history of Java isn't really about features or even programmer popularity.

(1) It was the first disruptive enterprise business model. They aimed to make everyone a Java programmer with free access (to reduce the cost of labor), but then charge for enterprise (and embedded and browser) VM's and containers. They did this to undercut the well-entrenched Microsoft and IBM. (IBM followed suit immediately by dumping their high-end IDE and supporting the free Eclipse. This destroyed competition from Borland and other IDE makers tying their own libraries and programming models.)

(2) As an interpreted language, Java became viable only with good JIT's. Borland's was the first (in JDK 1.1.7), but soon Urs Holzle, a UCSB professor, created the HotSpot compiler that has seeded generations of performance gains. The VM and JIT made it possible to navigate the many generations of hardware delivering and orders-of-magnitude improvements and putting software in every product. Decoupling hardware and software reduced the vertical integration that was killing customers (which also adversely affected Sun Microsystems).

btw, Urs Holzle went on to become Google employee #8 and was responsible for Google using massively parallel off-the-shelf hardware in its data centers. He made Google dreams possible.

fleventynine•1h ago
Still no unsigned integer types in the standard library after 26 years?
zeroq•1h ago
Joshua Bloch's work on Collections for Java2 was absolutely formative for me.

I was just starting real programming, I knew naming was hard so I was using thesaurus almost as extensively - if not more - than the reference manual.

But his work defined designing API for me for life. Stuff we take for granted, and we often overlook as seemingly trivial.

Let's say you have a collection type that has a method ``put``. It takes two arguments - an object you want to insert, and an index you want to put it at. Which argument should go first? Could index be optional? What value should it default to? Does the function returns anything? A boolean to indicate whether insertion was successful? Or the index at which the object was put? If latter how you indicate an error?

All of these seems seemingly trivial but he and his team worked on that library for over a year and he throughly documented their work in series of presentations.

And we can't forget about his java puzzlers, absolute gem.

parallax_error•1h ago
I can’t believe lambdas got a 4/10! I’m a student so maybe my opinion will change when I work on “real” code but I really like their conciseness
1a527dd5•1h ago
I owe Java a lot. Programming clicked for me when I was taught OOP in Java, my other programming module with event-driven design in C# which I hated.

Fast forward a few years later, and I'm actually at a C# shop.

Fast forward a decade, I'm at the same shop. I adore C# and I fondly remember my foray into Java.

I left Java around the time Streams were becoming a thing. I thought it looked like a mess, and then I ran into LINQ in C# land. Swings (pun intended) and roundabouts.

yousfzaxoy88•13m ago
Zaxo