The idea of this implementation comes from a very interesting talk by Remi Forax which he has given at ParisJUG in June 2015 and at Devoxx in November 2015. See also the corresponding slides or the complete Devoxx session on YouTube.
I couldn't resist to work with the examples myself. But because there is already the original implementation in Java 8 and a port in Scala I started another experiment to port all the examples to .NET (C#). Although I have ported almost all the examples, not all of them are equally reasonable and elegant in .NET as the original Java versions. Reasons for this are different language features between .NET and Java as for example:
- Java uses functional interfaces whereas .NET uses delegates
- Interfaces in Java can have default methods which are not possible in .NET
- Interfaces in Java can have static methods which are not possible in .NET
- On the other hand .NET supports extension methods which are not available in Java
- Java 8 introduces the Stream API whereas .NET supports LINQ (Language-Integrated Query)
- Java uses type erasure whereas .NET doesn't