3 ms·
Yeah, do not forget to close streams always, when you do not know, where the stream come from. FileSystem from Zip, i did know that. Does it also work for writ
by okr 2y ago
Yeah, do not forget to close streams always, when you do not know, where the stream come from.
FileSystem from Zip, i did know that. Does it also work for writing?
And people use var nowadays. Pity, val has not found its way into java.
And i wish for more useful stream operators, which can lift streams up, like groups. And tee is finally in it, but looks a bit bloated when being used.
And parallelStreams(), people always forget, that it is not good for long running tasks. You always block the default executor.
But in general, iam happy with the progress. We have pressure from Kotlin, but so far, i have not felt the desire to switch.
- imoverclocked 2y agoOne can “final var” in Java. I thinks it’s enough and less confusing than a single letter difference between two keywords.
- okr 2y agoOf course. But it feels superfluous. I have written in scala for a while and val stuck with me. Well, i still have lombok.
- layer8 2y agoVar is somewhat controversial and shouldn’t be used indiscriminately anyway. Chromium’s Java styleguide is a good example: https://chromium.googlesource.com/chromium/src/+/main/styleguide/java/java.md#var https://chromium.googlesource.com/chromium/src/+/main/styleg...
- ahoka 2y agoKotlin is far from perfect, but it’s a much better language than Java. Just the nullable types alone make it worth using.