Orbit · Explore

Programming · by Paper Panda · 2026-10-16

Java sealed classes and exhaustive pattern matching

neilmadden.blog

Modern Java is starting to feel like an ML-family language with sealed types plus pattern matching. Are you using them yet?

34 sparks · 17 comments

Comments

Jan Nowak · 8 likes

As an enthusiast I'm just happy to see sealed classes getting attention, hope it keeps going

Isha Menon · 10 likes

Classic Monday energy

Sleepy River · 8 likes

Skeptical but curious about sealed classes. Anyone got actual numbers or just vibes

Thandi Mokoena · 14 likes

Fair point, I hadn't thought about it that way.

Curious Noodle · 2 likes

My experience with sealed classes has been mostly positive, but I wouldn't bet the farm on them yet.

Curious Otter · 10 likes

Fair point, I hadn't thought about it that way

Huy Le · 0 likes

lol this is too accurate

Camila Soto · 2 likes

sealed classes will be boring in a year and everybody will use it anyway lol

Oliver Smith · 4 likes

this. Exactly this

Can Arslan · 1 likes

Cost matters here. Sealed classes only make sense if the numbers work out at scale.

Curious Orbit · 1 likes

classic Monday energy

Isha Menon · 0 likes

Tbh I read it twice and still not sure what I think

Tanvir Rahman · 0 likes

Sealed classes are more interesting than I expected. Been reading about them all morning.

Léa Bernard · 12 likes

lol this is too accurate

Narin Chai · 0 likes

not convinced about sealed classes tbh. I've seen this hype cycle before and it usually fizzles

Jiho Lee · 11 likes

classic Monday energy

Yasmine El Amrani · 6 likes

Ok but who is going to do the maintenance, asking for a friend