by grumpyprole · 5y ago · 0 comments
t -> bool
Much simpler and easier to consume.How would you assign a nominal type to the result of a SQL query?
So there are arguments on both sides. My point was that structural types can always easily be turned into a nominal type, but not the other way around. Therefore they should be the default.
com.google.common.base.Predicate<String> guavaPredicate = ...
java.util.function.Predicate<String> predicate = guavaPredicate::apply;For example, although Java method definitions are essentially defined in terms of tuples, function classes and objects in Java are all entirely nominal.