Functional Programming Library for Golang by IBM

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • fp-go

    functional programming library for golang (by IBM)

  • True, however the README does link to this:

    https://github.com/IBM/fp-go/tree/main/samples

  • gofpher

    a collection of functional programming constructs for go

  • I'm glad to see this idea getting some traction again. I haven't used Go much in the last few years, but I started writing playing around with a similar idea back in 2016 when I was working on a small compiler for a configuration management tool, and later put together a [small stand-alone proof of concept library](https://github.com/rebeccaskinner/gofpher) as part of a [talk](https://speakerdeck.com/rebeccaskinner/monadic-error-handlin...).

    At the time, I remember finding FP in go surprisingly ergonomic. Implementing the library to support it was a pain since the type system wasn't expressive enough to prevent everything from devolving into a pile of untyped reflection, but it was reasonably easy to keep that an implementation detail. On the whole, I felt like go would have lent itself well to the "dash of FP for flavor" style of programming that seems to be gaining popularity these days. Unfortunately, in 2017 at least, the Go community seemed to have very little interest in the idea.

    I still have a fondness for Go. It always felt nice to use. If the language features have caught up to the point where a robust library like this is feasible, and the communities attitude has shifted, I might take another look at the language.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • scala

    Scala 2 compiler and standard library. Bugs at https://github.com/scala/bug; Scala 3 at https://github.com/scala/scala3

  • Big Scala vibes here, see also [1].

    1: https://github.com/scala/scala/blob/v2.13.11/src/library/sca...

  • lo

    💥 A Lodash-style Go library based on Go 1.18+ Generics (map, filter, contains, find...)

  • A simple alternative is the combination of:

    - https://github.com/samber/lo

    - https://github.com/samber/mo

    The split is also nice as you can choose to just use the generic convenience functions from lo without the more FP related things from mo.

  • mo

    🦄 Monads and popular FP abstractions, powered by Go 1.18+ Generics (Option, Result, Either...)

  • A simple alternative is the combination of:

    - https://github.com/samber/lo

    - https://github.com/samber/mo

    The split is also nice as you can choose to just use the generic convenience functions from lo without the more FP related things from mo.

  • fp-ts

    Functional programming in TypeScript

  • The library for TypeScript that this is influenced by is here:

    https://github.com/gcanti/fp-ts

    Interesting how both languages with this library converge to a similar syntax, due to heavy use of functions.

  • FuncFrog

    Stream api (kind of) implementation for go, other useful functions and packages to use go in a functional way

  • if it have to be in FP style, this one is better

    https://github.com/koss-null/FuncFrog

    still prefer non-FP part tho

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts