Top 16 Java Functional programming Projects
-
Javaslang
vʌvr (formerly called Javaslang) is a non-commercial, non-profit object-functional library that runs with Java 8+. It aims to reduce the lines of code and increase code quality.
Project mention: What is your favourite Java specific feature that you miss in other languages? | reddit.com/r/java | 2022-04-02I'm aware not everyone likes it, but vavr has these.
-
Not long ago Gradle scared me a lot 👻 ... maybe it was because of Groovy? 😱
-
Scout APM
Less time debugging, more time building. Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.
-
Project mention: Reactor-Core - Non-Blocking Reactive Foundation for the JVM | reddit.com/r/github_trends | 2022-05-05
-
I made one (Before realizing it'd already been done) to backport newer language features to Java 8 and it was pretty easy to bundle it up as a maven plugin. But going back all the way to 4 will be a notable increase in difficulty. Retrolambda goes to 1.5 but not all the way to 4. You could hypothetically add a layer on top of it to support 1.5 -> 1.4. That or roll a fork of it.
-
jOOλ
jOOλ - The Missing Parts in Java 8 jOOλ improves the JDK libraries in areas where the Expert Group's focus was elsewhere. It adds tuple support, function support, and a lot of additional functionality around sequential Streams. The JDK 8's main efforts (default methods, lambdas, and the Stream API) were focused around maintaining backwards compatibility and implementing a functional API for parallelism.
-
It gets more perverse if you need to flatMap, or transmute components of map types, etc. If you want even more power, take a look at https://github.com/amaembo/streamex. This sort of container manipulation bread and butter for business processing. I use it every day, sometimes with a dozen operations. This (with liberal use of `final` values) makes for some pretty functional-looking code.
I'll grant you the Kotlin or Scala version is slightly more compact. But not fundamentally different, like the Go version.
I (and the pretty much every language designer in the post-Java era) disagree with you about checked exceptions, but that's a whole different thread...
-
Project mention: How to write this (3) Java lines in a functional style? | reddit.com/r/functionalprogramming | 2022-06-21
A few side-notes about this code: - you need some sort of "wrapper" or "container" in order to use functional methods like map/flatMap/filter/etc on some object - here I used Optionalfor testing because it's available in standard Java: Optional describes an object that may or may not be available. - A more suitable "wrapper" for this use-case could have been Try which describes the result of an execution that may succeed or fail, see vavr has a Try for example, functionaljava has Either - map transforms A -> B (would make sense for your mapToUser) whereas flatMap transforms A -> Optional (or whichever "wrapper", would make sense for your userService.save if suppose the saving operation can fail) - Here is a working example for you :) - practise exercises: 1- replace the "wrapper" Optional with List, there is almost no change of code, this now gives you the ability to process lists of users 2- import vavr and replace the "wrapper" Optional with Try, there is almost no change of code, this now gives you the ability to process operations that may fail - Enjoy functional programming, you'll find java is rather verbose and quickly gets clunky for FP, consider switching to another language
-
SonarLint
Deliver Cleaner and Safer Code - Right in Your IDE of Choice!. SonarLint is a free and open source IDE extension that identifies and catches bugs and vulnerabilities as you code, directly in the IDE. Install from your favorite IDE marketplace today.
-
Project mention: What's everyones favorite Stream utility library (or ies)? I see jOOL and StreamEx mentioned occasionally, are there others? | reddit.com/r/java | 2021-12-14
I always thought cyclops was interesting because it offers both an Eager and Lazy API.
-
-
derive4j
Java 8 annotation processor and framework for deriving algebraic data types constructors, pattern-matching, folds, optics and typeclasses.
-
-
-
libraries like https://github.com/pivovarit/throwing-function
-
-
Project mention: Is there a cats-effect or ZIO for Java? If not, then what are the blockers of having an effect system as of Java 17? What are the drawbacks of such a library in Java? | reddit.com/r/java | 2021-08-28
-
roman-arabic-calculator
This code is a proof of concept. The calculator can work with both Arabic (1,2,3,4,5 ...) and Roman (I, II, III, IV, V ...) numbers.
Java Functional programming related posts
- How to write this (3) Java lines in a functional style?
- Show HN: Pidove, an Alternative to the Java Streams API
- Reactor-Core - Non-Blocking Reactive Foundation for the JVM
- Be reading academic computer science papers
- Alternate library for parallel stream processing?
- What is your favourite Java specific feature that you miss in other languages?
- Best Functional Library for Java ? And do you recommend going for a functional style in Java?
Index
What are some of the best open-source Functional programming projects in Java? This list will help you:
Project | Stars | |
---|---|---|
1 | Javaslang | 4,867 |
2 | groovy | 4,535 |
3 | reactor-core | 4,173 |
4 | Functional Java | 3,542 |
5 | jOOλ | 1,919 |
6 | StreamEx | 1,894 |
7 | functionaljava | 1,504 |
8 | cyclops-react | 1,229 |
9 | λ | 808 |
10 | derive4j | 542 |
11 | protonpack | 459 |
12 | underscore-java | 391 |
13 | throwing-function | 328 |
14 | Faux Pas | 113 |
15 | purefun | 66 |
16 | roman-arabic-calculator | 0 |
Are you hiring? Post a new remote job listing for free.