HN user

bberrry

689 karma
Posts2
Comments184
View on HN

Those of you surprised to see Java so prominent, where have you been all your careers? 10 people startups with nodejs backends? You must have been entirely shielded from enterprise software companies.

Kotlin does improve on the primitives/boxed situation. For example in Kotlin there is just "Int", not both "int" and "Integer". The language will use stack-allocated primitives wherever possible and boxed objects when necessary (in Collection generics or when you've explicitly opted into nullability). The distinction is abstracted away from you as a programmer. Sounds like the consistency you want.

Depends on what you're writing I guess (as always). I write backend services and if there is an exception thrown, generally the whole request is forfeit. So a top-level exception handler is all that's needed.. no checked exceptions ruining my lambdas or streams like in Java.

I'm so incredibly thankful that there are people like Pavel and Chris putting effort into articles like this. You are truly the best of us

I don't understand these benchmarks at all. How could it possibly take virtual threads 40-50 seconds to reach maximum throughput when getting a number of tasks submitted at once?

I don't think that's correct. ThreadLocals should behave just like on regular OS threads, the difference is that you can suddenly create millions of them.

You used to be able to depend on OS threads getting reused because you were pooling them. You can do the same with virtual threads if you wish and you will get the same behavior. The difference is we ought to spawn new threads per task now.

Side note, you have to specifically use InheritableThreadLocal to get the inheritance behavior you speak of.

If you are already in a reactive framework, why would you change to virtual threads? Those frameworks pool threads and have their own event loop so I would say they are not suitable for virtual thread migration.

> Hiring on merit will be a permanent policy at Scale.

Isn't this what everyone tries to do?

You seem to have missed that meritocracy has recently become a bad word and undesirable in some political circles.