Remove these methods from Option to enforce passing a callable for laziness
Closed this issue · 1 comments
daviddenton commented
public abstract Option<A> orElse(Option<A> other);
public abstract A getOrElse(A other);
danielbodart commented
Okay I've looked into this more and this really seems to only be a surprise if you come from Scala.
I literally have hundreds of usages using primitives or empty values i.e 0, "", list() and I wouldn't want these to have the the visual noise of a lambda or the performance impact.
Let me know what you think