refactoring some Guava ListenableFUture to Java 8 CompletableFuture
Hi, I'm doing research on new concurrent constructs in Java 8. CompletableFuture in Java 8 has the same functionality as Guava ListenableFuture. But CompletableFuture is much nicer because it comes together with Lambda expression in Java 8, and it is monadic, which makes the code more readable and cleaner. Also, it provides more ways to compose different tasks. Therefore, using CompletableFuture instead of ListenableFuture is better for future extension and maintenance of the code.
I tried to refactoring some ListenableFuture instances in trinityshell to CompletableFuture, so you can see the difference. You don't have to merge this pull request. I'm just wondering your opinion on this kind of refactoring (or migrating the code from Java 7 to Java 8). Do you think the refactoring is useful? Do you have any plan to use Java 8? Thanks.
To answer your questions: -Do you think the refactoring is useful? Certainly, standardizing and minimizing dependencies on other frameworks is always a good thing. However the master branch is no longer developed, instead development is focused on 0.1.0-SNAPSHOT branch.
Do you have any plan to use Java 8? The project on the 0.1.0-SNAPSHOT branch already uses java8 (it's also a complete rewrite), the project on the master branch started when java8 was still in beta, the main reason why guava's optional and listenable future were used instead of java8 counterparts.