JavaFX 2 was clearly designed with an eye on new features coming in Java 8, particularly lamba expressions. As a result, there are some JavaFX APIs which have anticipated Java 8 library enhancements. For example, the javafx.util.Callback interface is basically identical to the proposed java.util.function.Function interface (see [url http://cr.openjdk.java.net/~briangoetz/lambda/sotc3.html]here or [url http://sett.ociweb.com/sett/settFeb2013.html]here).
Are there plans to retrofit JavaFX APIs to support the new Java 8 libraries (so I can pass a Function instead of a Callback to a setCellFactory(...) method)? It would seem to make sense to unify around the new Java APIs rather than having JavaFX versions of them. Should we expect Callback to eventually be deprecated in favor of Function?
This would be an API breaking change and I don't see a reason for it. People using lambda expression won't care if one passes a Callback or Function because the compiler does generate the appropriate bytecode representing the SAM type.
I guess I was envisioning scenarios where a (FX agnostic) business layer exposed Functions for manipulating data in the model. But I suppose "converting" these to Callbacks becomes completely trivial using function references... I was still thinking with my Java 7 hat on.
It still seems a bit unwieldy to have different core APIs replicating identical functionality, though.