r/functionalprogramming • • Mar 22 '20

Haskell It never makes sense to use foldl on lists

Thumbnail
github.com
26 Upvotes

r/functionalprogramming • • Dec 14 '19

FP Kleisli composition and other fishy operators

Thumbnail
functional.christmas
26 Upvotes

r/functionalprogramming • • Sep 13 '19

OO and FP In what situations is imperative/OOP/stateful code better than purely functional Code?

26 Upvotes

I went to r/AskProgramming and asked them a similar question (https://www.reddit.com/r/AskProgramming/comments/d3mq4z/what_are_the_advantages_of_object_oriented/) but did not get very satisfying answers. Do you think pure FP is the way or are there situations where non FP code is better? Also do you think a mix of paradigms would be the best?
Maybe this is the wrong place to ask but i figured people who know FP well, would also know what the shortcomings of FP are.

Edit: Thanks for all the great answers. Its amazing how much better r/functionalprogramming is at defending imperative and oop than r/askprogramming.


r/functionalprogramming • • Jun 19 '19

Witchcraft: the magic of math, functional programming, and community

Thumbnail
medium.com
26 Upvotes

r/functionalprogramming • • Jun 14 '19

Functional Design and Architecture book

Thumbnail
self.haskell
26 Upvotes

r/functionalprogramming • • Feb 24 '19

FP Why You Must Actually Understand The Ω and Y Combinators

Thumbnail
medium.com
26 Upvotes

r/functionalprogramming • • Feb 07 '18

Question Purescript vs ReasonML/Bucklescript in 2018?

26 Upvotes

Which language would you pick for a new project in 2018, that has an imporant browser component?

Last year I looked into both, found the OCAML documentation and error messages extremly lacking, and enjoyed purescript much more.

However, it seems that purescript stagnated since and reasonml is building up steam.

What's your guys impression as of early 2018 regarding advantages, documentation, ecosystem (JS interop, well documented libraries) and future-proofedness (is this a word?) of these platforms and which one would you pick?


Edit one month later: Greetings to the visitors from the future! After playing around further, I gave up on Ocaml. For me

  • Error messages were completley useless. Everything would yield a "syntax error" with a seeming random line-number. In many cases the error message wasn't described, but encoured me to send pull requests with an updated message. These were obviously beginner mistakes, so nothing too fancy, and it forced me to scan every line manually to make sure all the ; and ) were in place.

  • I never got warm with the reason syntax. The javascripty look of reason made it more difficult to write than original ocaml/bucklescript, especially when to put ; {} () or not.

  • Tutorials/docs are rare and confusing. I never knew if I was learning Reason, Bucklescript or Ocaml

  • The toolchain only works if Reason, Bucklescript, Merlin and Ocaml are in very specific versions. Obviously the error messages you get are shit, so I spent far too much time on getting it running and I had to compile from source. Also, ReasonReact is it's own framework, so it's one more layer detached from react and data needs to be handed around between the components. All in all, updates are unpredictable and I don't trust the upgrade path.

  • Server side ecosystem is practically non-existent for modern use cases.

  • Apparently the majority of users are French students who learn Ocaml at university and there is very little adoption outside.

Final verdict for me personally: Unless there's a french guy in your team who already knows it, troubleshooting and boarding is hell and a time vapire. Also given the low maturity of the framework (error messages, old ocaml version, tutorials), I don't trust its upgrade path.

Maybe you get better results, but for me it's not worth it.


Purescript: Stagnated, but still nice. The React frameworks are terribly slow in benchmarks up to 8x slower than most of the field. For complex client side calculations and limited UI with a team that already knows haskell, I'd probably pick this.


Clojurescript: I stumbled upon it because its react frameworks perform amongst the fastest with less code, it's functional and immutable (with escape hatches). It's not typed, but it has Spec, which allows for quickcheck type autogenerated test cases, spec reuse for runtime validation and even regex and code-defined validation for what values are allowed into a type. The compiler is quick and clojure on the server integrated with the java ecosystem, it also has frameworks for react native.


All in all, this may sound blasphemous, but for me the most useful functional, typed frontend language is still Typescript with Ramda and Immutable.js. That gives me ADT, function composition, immutability, lenses, etc, with a rich ecosystem and easy boarding. Only thing I miss is type inference which makes me retype interfaces and types all over the place. For UI oriented applications Clojure(script) with Spec seems a nice fit. (I didn't check elm due to mounting negative feedback about breaking changes between versions). To use even more typed features purescript still the best, but be concious of the performance penalty.


r/functionalprogramming • • Sep 03 '16

So You Want to be a Functional Programmer (Part 1)

Thumbnail
medium.com
26 Upvotes

r/functionalprogramming • • May 25 '14

What FP blogs do you read?

26 Upvotes

Where do people go for streams of functional programming related material? Lambda the Ultimate is the only one I'm aware of.


r/functionalprogramming • • Sep 06 '26

FP Mezze: a functional programming language on GraalVM

Thumbnail mezze-lang.org
25 Upvotes

r/functionalprogramming • • Mar 28 '26

Miranda I packaged Miranda (the language that inspired Haskell) as a Homebrew formula

25 Upvotes

Miranda is the direct predecessor of Haskell, it was designed by David Turner in 1983, it introduced lazy evaluation, polymorphic strong typing, and algebraic data types to a wide audience. If you're on macOS and want to try it:

brew tap m0tay/miranda
brew install miranda
mira

Source: https://github.com/m0tay/homebrew-miranda

The original source is maintained at https://codeberg.org/DATurner/miranda
All credits to Martin Guy for keeping it alive after Professor Turner passed away in October 2023.


r/functionalprogramming • • Feb 20 '26

Elm SOLID in FP: Open-Closed, or Why I Love When Code Won't Compile

Thumbnail
cekrem.github.io
25 Upvotes

r/functionalprogramming • • Mar 17 '25

News Rhombus is ready for early adopters

Thumbnail rhombus-lang.org
25 Upvotes

Rhombus is ready for early adopters.
Learn more and get it now at https://rhombus-lang.org/


r/functionalprogramming • • Mar 13 '25

Lisp Racket 8.16 is now available

25 Upvotes

Racket 8.16 is now available for download.

Racket, a functional programming language, has an innovative modular syntax system for Language-Oriented Programming. The installer includes incremental compiler, IDE, web server and GUI toolkit.

This release has expanded support for immutable and mutable treelists and more.

Download now https://download.racket-lang.org

See https://blog.racket-lang.org/2025/03/racket-v8-16.html for the release announcement and highlights. Discuss at https://racket.discourse.group/t/racket-v8-16-is-now-available/3600


r/functionalprogramming • • Jan 11 '25

Question What is the closest language to Rust at the FP world?

25 Upvotes

I'm learning Scala because it's a requirement at the company that I'm working on, but I absolutely hate it. I tried, I have read a few books, did some small projects, but it's not for me. The wildcard imports, implicits everywhere, JVM, all the magic, it's just a big no no. I like simpler languages likes Go, but I would like to have a better type system. Rust would be the ideal fit if it had an GC. I'm wondering if there is anything at the FP world similar to Rust but with a GC.


r/functionalprogramming • • May 28 '24

λ Calculus Lambda Calculus For Dummies: Introduction

Thumbnail
youtube.com
25 Upvotes

r/functionalprogramming • • May 18 '23

Intro to FP Use Pure Functions to understand Functional Programming

Thumbnail
functional-fieldnotes.hashnode.dev
25 Upvotes

r/functionalprogramming • • Apr 17 '23

OCaml A detailed proposal for a data-race-free OCaml (e.g. Rust's borrow-checker)

Thumbnail
github.com
25 Upvotes

r/functionalprogramming • • Feb 04 '23

FP The B₁ and ϕ₁ Combinators

Thumbnail
codereport.github.io
25 Upvotes

r/functionalprogramming • • Dec 12 '22

Conferences The Verse Calculus: a Core Calculus for Functional Logic Programming (details on Epic Games/Simon Peyton Jones' new language)

Thumbnail simon.peytonjones.org
25 Upvotes

r/functionalprogramming • • Sep 12 '22

Question Resource on the State monad for 'beginners'?

25 Upvotes

I'm quite confident in using some monads in my code like Maybe/Option, Either/Result and even implemented rudimentary versions of them in some languages for learning purposes. I've been in love with them ever since. Though, I can't get my head around the State monad and how/when to use it in a program or how to implement it.

I'm looking for a good book or tutorial series, any language is fine if the focus is the concept instead of the language itself. If anyone knows a good place to start, preferably not something too small like a blog post, I'd appreciate it very much.


r/functionalprogramming • • Aug 13 '22

Books Functional programming: application and implementation - Henderson, Peter (1980)

Thumbnail
archive.org
25 Upvotes

r/functionalprogramming • • Apr 30 '22

Question Any example of a good business domain model designed functionally?

25 Upvotes

I see FP praised in the context of a "programming domain" i.e. how great it is for race conditions, working with lists, etc.

I was exploring Github and sadly cannot find any F# libraries that are business domain issues and not programming domain issues.

For example, there are F# libraries for linting, HTTP, REST operations, buffers, etc.

I can't find any on business concerns like art, money, legal, geography, graphic design, etc.


r/functionalprogramming • • Dec 05 '21

Question Should I learn about monads?

25 Upvotes

I set out to learn about functional programming a few months ago. I come from a background as a web developer.

I read 'Professor Frisby's Mostly Adequate Guide to Functional Programming' (https://mostly-adequate.gitbook.io/mostly-adequate-guide/). It makes heavy use of monads, for example:

Either.of('The past, present and future walk into a bar...').map(concat('it was tense.'));

Maybe.of({ name: 'Boris' }).map(prop('age')).map(add(10));

This seemed interesting to me, but pretty mind bending and far from how teams I've worked with program.

In parallel I read 'Programming Clojure' (https://www.amazon.com/Programming-Clojure-Stuart-Halloway/dp/1934356867) and watched a some videos by people in the Clojure community.

The book raised several interesting thoughts in my head like 'How would I do lazy evaluation of infinite series in JavaScript?' and 'Transactions is an interesting model for async code that I hadn't considered could exist'. But the book didn't contain any discussion about monads as far as I can remember and the programming overall felt pretty familiar to me. I saw a video where (as I remember it) a prominent figure in the Clojure community criticised the Either.of construct in particular and similar constructs in general.

Originally I thought that I would build a web app using concepts like monads from the mostly adequate guide to gain new useful programming tools. But the Clojure track discouraged me. From that track I got the impression that I've gotten most of the value I can from the functional programming world by reading a few texts like 'Out of the tar pit'.

What do you guys think? Is reading 'Out of the tar pit' and being mindful of state and complexity enough or would I become a more productive programmer by getting practical experience from monads and similar to me esoteric stuff?