Re:To learn a new language, read its standard library
by axegon_ on Monday October 25, 2021 @05:36AM
(#28985953)
> You won't see Optional<T> being used there.
I think Rust is in a category of it's own, mostly due to circumstances rather than anything: The ecosystem has grown immensely over the past several years and you can find a crate to solve most of your needs. But here is where thing become tricky: more often than not the documentation provided is extremely vague to put it mildly and the examples are a hello world at best. With this in mind, in order to truly use it you have little to no choice but to dig deep into the implementation and at some point reach the standard library.
Re:To learn a new language, read its standard library
by nico_h on Monday October 25, 2021 @05:24AM
(#28985916)
What's a good way to learn about the proper way of writing java 11 in 2021 / 2022 ? I'm currently trying to escape writing java 1.5 style code in java 8.
Re:To learn a new language, read its standard library
by evercast on Monday October 25, 2021 @11:25AM
(#28988876)
I think "Effective Java, 3rd edition" is a good book to have a look at. It is not entirely up to date but covers Java 8 features which are a must.
In general, I'd heavily recommend studying the usage of lambdas & streams. And Optional<T>. ;)
For example, I do not think it is possible to learn modern Java by reading Java Collections code. You won't see Optional<T> being used there. Instead, your takeaway might be that it is perfectly fine to return nulls all over the place.