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

Hi. You missed the opportunity to implement the reader as an AutoCloseable and do the get as a Reader method.

That way, classe users will be warned by the IDE that they should use a try-with-resources when acquiring a Reader.

For the sake of completeness here, Java compiler will warn about it, but that warning is disabled by default.



That's actually exactly what I did! I removed this part from the article as I felt it was not relevant for the concurrent protocol design and it was adding mental load for readers not that fluent in Java.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: