> Has anyone seen java.util.Optional in the new Lambda builds? >
Yes. Why is there no flatMap? > I asked it but received no meaningful answer. > Why does it not support iteration (can't do a for loop over an Optional)? > I asked it but received no meaningful answer. However I tried to do it by myself and it is a bit tricky because by making Option (maybe I am too used to Scala but I very dislike the Optional name) implementing Iterable you will have a clash with the map and flatMap methods defined there. Nothing undoable anyway. > Why doesn't it have Some/None subclasses? > I asked it but received no meaningful answer. > Why does Scala and Functional Java get this right yet Guava and now the > core Java guys completely ruin it? > I asked it about Java (I am not a Guava user so I didn't check how it is implemented there) but received no meaningful answer. > Why doesn't Java 8 have persistent immutable collections? > I wasn't thinking about it because it is not directly related with the Option topic, but it is a very good question indeed. > Some of the JDK developers have real talent, but this is completely > amateur. > I am sorry to say that I completely agree on that. > I really hope they can fix this before it is set in stone. Tons of decent > functional programmers can write a complete Option implementation easily as > a fun exercise. It boggles my mind that they don't have the decent talent > working on something so important. > True. That is what I tried to do here http://java.dzone.com/articles/no-more-excuses-use-null for example. Moreover I tried to reopen the discussion in October ( http://mail.openjdk.java.net/pipermail/lambda-dev/2012-October/006130.html ) but as I said I received no meaningful answers. Mario -- You received this message because you are subscribed to the Google Groups "Java Posse" group. To view this discussion on the web visit https://groups.google.com/d/msg/javaposse/-/zsJSs52ncaAJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
