mapdb icon indicating copy to clipboard operation
mapdb copied to clipboard

Java 8 support

Open jankotek opened this issue 13 years ago • 2 comments

Java 8 introduces functional interfaces such as (Function1, Function2...). MapDB has similar stuff (in Fun.*) and it would make sense to drop ours and use classes provided by Java 8. This means that MapDB would still work with Java 6/7, but would require compability Jar file with those interfaces.

jankotek avatar Mar 29 '13 12:03 jankotek

Although Java 8 provides several functional interfaces (Function, BiFunction etc.) these are not necessary for lambda support. Any Interface with a single abstract method can be used for a lambda or method-reference.

The interfaces you have in Fun (Runnable1 and 2, Function1 and 2) are fine. That way there is no need for different compatibility Jar files.

christian-laakmann avatar May 17 '13 08:05 christian-laakmann

In future I would like to drop Fun.* and implement some "universal" functional interfaces. Java8 was obvious choice, but it is delayed now by more than a year. Guava would be other choice but it does not have small 'api' jar.

So Fun.* stuff will make it into MapDB 1.0 and we will use it forever.

jankotek avatar May 18 '13 17:05 jankotek