Tim Holloway wrote:Unless I am very mistaken, "char" is a Unicode character. Not the same thing as in C/C++ where "char" practically means thinly-disguised byte. So I fail to see where using char with non-western languages makes any difference.
In fact, the pædant in me says that treating characters as integers is the more questionable practice.
As one who works with binary streams fairly regularly I miss my unsigned byte datatype. 3-4 years back I wrote a parser for such a stream in Java and had all sorts of issues.
Of course, that's completely irrelevant to this thread, which I'm finding very interesting. Can anyone recommend a good book for learning streams?
Be careful when following the masses, sometimes the m is silent.
It is probably a good idea to keep the thread this post was split from for “idioms”.
I can think of a few books: I have all the following:
Cay Horstmann: Core Java II 2015/6 edition (I think 10/e), volume II
Also Core Java SE8/Java SE9 for the Impatient (two books presumably very similar: I have the Java9 edition). Don't confuse this book with the beginner's book with a similar name.
Urma Fusco and Mycroft: Java8 in Action (Manning 2014) and Modern Java in Action which is a more recent version of the same book.
Maurice Naftalin Mastering Lambdas: Java Programming in a Multicore World (Oracle Press 2014).
Ken Koiusen Modern Java Recipes (O'Reilly 2017) Slightly different: this isn't a tutorial but a cookery book supplying recipes for particular problems.
Other people will doubtless have their recommendations, too.