Java Functional programming

Open-source Java projects categorized as Functional programming Edit details
Related topics: #Java #Monad #Optics #Monoid #Java8

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-02

    I'm aware not everyone likes it, but vavr has these.

  • groovy

    Apache Groovy: A powerful multi-faceted programming language for the JVM platform

    Project mention: First Steps Developing Custom Gradle Plugins | dev.to | 2022-06-22

    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.

  • reactor-core

    Non-Blocking Reactive Foundation for the JVM

    Project mention: Reactor-Core - Non-Blocking Reactive Foundation for the JVM | reddit.com/r/github_trends | 2022-05-05
  • Functional Java

    Backport of Java 8's lambda expressions to Java 7, 6 and 5

    Project mention: What can I do with Java 1.4? | reddit.com/r/java | 2022-02-11

    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.

  • StreamEx

    Enhancing Java Stream API

    Project mention: Jodd – The Unbearable Lightness of Java | news.ycombinator.com | 2022-01-17

    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...

  • functionaljava

    Functional programming in Java

    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.

  • cyclops-react

    An advanced, but easy to use, platform for writing functional applications in Java 8.

    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.

  • λ

    Functional patterns for Java

    Project mention: Paltable Lambda for Java | news.ycombinator.com | 2022-02-17
  • derive4j

    Java 8 annotation processor and framework for deriving algebraic data types constructors, pattern-matching, folds, optics and typeclasses.

  • protonpack

    Stream utilities for Java 8

  • underscore-java

    java port of Underscore.js

  • throwing-function

    Checked Exceptions-enabled Java 8+ functional interfaces + adapters

    Project mention: Still seeing misuse of Optional.. | reddit.com/r/java | 2022-02-27

    libraries like https://github.com/pivovarit/throwing-function

  • Faux Pas

    A library that simplifies error handling for Functional Programming in Java

  • purefun

    Functional Programming library for Java

    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.

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2022-06-22.

Java Functional programming related posts

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
Find remote jobs at our new job board 99remotejobs.com. There are 4 new remote jobs listed recently.
Are you hiring? Post a new remote job listing for free.
Developer Ecosystem Survey 2022
Take part in the Developer Ecosystem Survey 2022 by JetBrains and get a chance to win a Macbook, a Nvidia graphics card, or other prizes. We’ll create an infographic full of stats, and you’ll get personalized results so you can compare yourself with other developers.
surveys.jetbrains.com