Java 8 brought us lambdas and streams, both long-awaited-for features. With it came Optional to avoid NullPointerExceptions at the end of stream pipelines that might not return an element. In other languages may-or-may-not-contain-a-value types like Optional are well-behaving monads – but in Java it isn’t. And this matters to everyday developers like us! Introducing java.util.Optional […]
Continue reading %How Optional Breaks the Monad Laws and Why It Matters%
by Marcello La Rocca via SitePoint
No comments:
Post a Comment