I'm excited about the Lambda support in Java 8, which makes it very easy to implement simple, single-function interfaces by defining functions inline. I thought this could work very well with certain interfaces in the Foundry like Kernel, Metric, DivergenceFunction, PerformanceEvaluator, etc. to let you do things like:
KMeansFactory.create(4, (Vector x, Vector y) -> x.minus(y).normInfinity(), new Random());
However, several of these interfaces currently extend CloneableSerializable, which means that they technically have more than one method that needs to be implemented (a public clone), so the current lambda support doesn't work for them (without building adapter classes).
Thus, my proposal is to drop the "extends CloneableSerializable" from many of these simple functional style interfaces. Of course, implementations of these that need to be serialized can be by extending AbstractCloneableSerializable, as is normally done. Lambdas by default can be serialized, though it is not suggested.
The main impact of this change several clone methods need to be tweaked to call cloneSmart rather than cloneSafe. This isn't a full switch to Java 8, just something to make it easier to use the Foundry when you are doing so in an application using Java 8.
Are there any objections to this?
Thanks, : )