Java 10 has var so the type of local variables can now be inferred instead of tediously and redundantly specified.

Java 10 has var so the type of local variables can now be inferred instead of tediously and redundantly specified. Welcome to being just a little bit less horrible, Java.

Actually Java had been on a trajectory of getting a bit more modern for a number years now (lambdas and closures* arrived in 2014). This probably won’t save it from its ultimate fate however as Oracle starts charging people money for the JVM and Android devs start looking at cooler languages like Kotlin.

* for byte code compatibility reasons, they are actually just syntactic sugar for a hack made out of nested inner classes.

Everyone tries to explain monads but very few succeed.

Everyone tries to explain monads but very few succeed. I think this article is by far the most successful attempt I’ve read. I think I might be starting to get it.

Although not exactly the same, Promises and Observables work in a very similar way to monads. This becomes particularly evident when you look at chains of promises (which use a then() operator as “bind”.)

Observables are more like Haskell IO monads because they are lazy by design. None of the operations in an observable chain will run until something subscribes to it. All the functions must be pure but a running chain of Observables can do impure work such as making HTTP requests.