Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Structured concurrency is still being developed: https://openjdk.org/jeps/453

Also, I wouldnt consider that the equivalent Java code. That is all Spring and Lombok magic. Just write the code and just use java.net.HttpClient.



> and just use java.net.HttpClient.

No.


it might be obvious to others, but why the 'No'?


The standard http client doesn’t have as great of UX as other community libs. Most of us (including me) don’t like to use it.

That being said, imo you can’t call something equivalent when doing a bunch of spring magic. This disregards that OPs logic isn’t equivalent at all. It waits for each future 1 by 1 instead of doing something like CompletableFuture.allOf or in JS: Promise.all.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: