Hi Martijn, my favorit:
<T, X, Y, XY extends Function<X, Y> & Serializable, YT extends Function<Y, T> & Serializable>
:-D Anyway some places hard to read but the unit tests show the benefit! kind regards Tobias Am 06.10.15 um 11:15 schrieb Martijn Dashorst:
I've created a Lambdas class that compiles just fine in ECJ but fails using javac. https://gist.github.com/dashorst/da876be2f01770e862a5 The benefit of this way is that we don't perpetuate SerializableFoo (Foo==[Function, Consumer, Predicate, Supplier, ...]) but instead require that the passed in stuff is in fact serializable. This way companies that have their own SerializableFunction et al, kan pass those references into our Lambda models. Unfortunately this is currently way beyond the capabilities of javac. Check out the code above (the signature is quite hard to read, but in use it is awesome, just use Eclipse 4.5.1) Martijn
