News for hackers. Stuff that matters.
Re:Modern Java – A Guide to Java 8 by leothekim on Monday November 16, 2015 @12:22PM (#10575663)
Hear hear. A couple more features that'd be nice:

- An `public Optional<T> or(Optional<T> other)` so if optA is empty, then `optA.or(optB)` would return `optB`

- A `toStream` method on `Optional` (I believe this is coming in Java 9) or have a `Stream.flatMap` signature that flattens `Optional`s without needing to call `Optional.toStream` (Scala does this, arguable if this is an acceptable munge of Monadic types, but it's really convenient)

Re:Modern Java – A Guide to Java 8 by the8472 on Monday November 16, 2015 @02:58PM (#10576753)
Re:Modern Java – A Guide to Java 8 by wsh91 on Monday November 16, 2015 @01:40PM (#10576167)
Check out fugue: https://bitbucket.org/atlassian/fugue -- a proper monadic Option and more. :) (Full disclosure: I'm an Atlassian and I know/<3 the people who write it, but I also use it a fuckton in my own code.)
Re:Modern Java – A Guide to Java 8 by GeneTT on Monday November 16, 2015 @04:38PM (#10577394)
Yea this library with Java 8 makes functional style java actually kinda nice. The addition of an Either really opens up what you can do.