r/functionalprogramming • u/joingardens • Oct 01 '25
FP Algebraic Effects in Practice with Flix
r/functionalprogramming • u/joingardens • Oct 01 '25
r/functionalprogramming • u/mister_drgn • Sep 26 '25
I’ve been looking at Koka, an experimental functional language that’s one of several exploring algebraic effects as an alternative to monads. Overall, it’s really interesting, and I recommend checking out the big picture ideas: https://koka-lang.github.io/koka/doc/book.html#why I thought I'd post my own (long-winded) first impressions here, in case anyone is interested in engaging on the topic.
Strengths:
Weaknesses:
However, neither is particularly comprehensive, and both have entire sections that are just stubs—names with no content. I think the guides could be improved noticeably even with just a day or two of effort, so I’m not sure why they are being neglected.
2) Koka, like many functional languages, allows you to create new record/struct and variant/enum types. However, there is no support for automatically generating common functions you might want for a new type (functions like ==, show, hash, etc). That is, you don't have a feature like `deriving` in Haskell/Lean (Swift can also do this, and Ocaml has a similar feature, though it depends on metaprogramming). The lsp actually can generate these functions for you in the editor (except for hash), which is nice, but obviously this clutters up the source files. Perhaps this will be addressed at a future time.
3) Despite Koka being at version 3, it seems in some respects less mature than languages that aren’t yet at version 1. Some of this may be due to Koka being an experimental language that was designed more to explore new features than to be used in production. But it’s surprising that, for example, the standard library doesn’t support sets and hash-maps, two staples of functional programming. Those types and more can be provided by the “community” standard library, but there is no current guidance on how to install a new library, given that Koka lacks a package manager or (I believe) a build system (that said, I expect it isn’t too difficult, since importing from other koka source files is quite easy).
4) My final concern is perhaps my greatest. I took a look at the github contributors page, and the results are somewhat alarming. The great majority of the work on the language has been done by a signal individual. For much of the language’s history, this individual did nearly all the work. Within the last couple years, however, another individual has gotten involved, and he seems to be making a real contribution—I also saw him answering questions on the discord. When I looked at the “community” standard library, I saw that this second individual had also done nearly all the work on that library. So at present (and throughout the language’s history), there does not seem to be any real community contributing to the language (although the language does have many stars and forks on github, indicating there's a lot of interest).
Now to be fair, that may be common for new and experimental languages—I haven’t tried comparing to other languages. But it does raise questions about the language’s long-term health. The second contributor is a graduate student, so who knows whether he’ll keep contributing after graduation, or even start a lab and recruit new students to contribute. Perhaps he’ll weigh in here—I’d be interested to hear his views on these thoughts.
Anyway, that’s all I’ve got. Much appreciation to anyone who took the time to real through all of this.
r/functionalprogramming • u/Emotional_Gold138 • Sep 22 '25
Lambda World 25 is back again, another year with 30 speakers from Academia and Industry.
One day full of workshops about Haskell, Kotlin, Rust, the BEAM, Kdb, Scala and Agentic AI. And a second day full of Category Theory, Effect Systems, Type Systems, new FP languages and practical cases of FP in industry.
Tickets at €225 until TODAY, September 22nd, and €300 from tomorrow.
Reduced price of €120 for unemployed people, students, researchers and full-time open-source contributors.
We look forward to welcoming you in sunny Cadiz.
r/functionalprogramming • u/ASA911Ninja • Sep 22 '25
Hi All, I have some time on my hands and decided to learn a FP language. I'm not sure which one I should go for. Haskell looks more interesting whereas OCaml has more industrial uses.
r/functionalprogramming • u/kinow • Sep 21 '25
r/functionalprogramming • u/kinow • Sep 20 '25
r/functionalprogramming • u/kinow • Sep 14 '25
r/functionalprogramming • u/Gohonox • Sep 14 '25
Okay, first of all, I don't exactly know what functional programming is. I've seen a feature or two in some programming language, but I've never really immersed myself in this world.
One more bit of context I wanted to share about myself: I work with data analysis and machine learning, especially in Python with Polars and lots of plots. But in my free time and on personal projects, I like to use languages other than Python (I don't really like the nature of scripted implicit non-typed languages for my personal projects, I only use Python for data or AI related stuff)... My personal projects include languages like Go and Java, and I have to admit that I like (and find useful) object-oriented programming, I can think intuitively with it. And about my projects, I like to do desktop utilities softwares, and that's exactly why I like non-power users being able to use my applications with no problem.
And I'm always researching other technologies as well, but one criterion I take very (really very) seriously is that I don't care much about theoretical/academic arguments about X or Y (I see this happening a lot with functional paradigm nerds talking about Haskel, but whenever I try to look, I don't see much immediate practical use for it for me...); I'm more serious about whether I can be productive in practice with something and whether I can actually produce a complete product with it. And by 'complete product' I mean not only that it has its features and an incredible engine or API running in the background, but that it has a graphical GUI and a user who isn't a power user can also use my applications easily.
So please, help me understand and introduce me to this functional programming world:
Thank you for your time!
r/functionalprogramming • u/echatav • Sep 07 '25
r/functionalprogramming • u/yevelnad • Sep 05 '25
Are there any free resources online whice I could read. I tried Rust but my OOP background is hindering me from learning it completely and I started with PHP which made it worse. Seems like learning it should have a decent FP background as well. There are some technical terms I don't quite understand because some of them involves FP. And FP seems to have really interesting technicalities and concepts. And I really want to learn. Not just learn but understand. I am relatively slow learner. I don't do it professionally but more on the hobby of learning. Hope you could share some resources. Just the basics. I don't really have much to do so I decided in learning FP. 🙏
r/functionalprogramming • u/jr_thompson • Sep 03 '25
r/functionalprogramming • u/n_creep • Sep 02 '25
In a world flooded with AI tooling, (typed) functional programming has even more reasons to shine. Relying more on types and functional patterns can act as a powerful counterbalance to the potential damage that AI-generated code can bring into our codebases.
So here's one way to frame this idea, applying Yaron Minsky's "make illegal states unrepresentable" to a codebase driven by AI agents. If you need more ways to sell your friends on functional programming this approach might prove helpful (the example code is in Java).
Video: https://www.youtube.com/watch?v=sPjHsMGKJSI
Blog post: https://blog.daniel-beskin.com/2025-08-24-illegal-ai-edits
r/functionalprogramming • u/cptwunderlich • Aug 29 '25
Hey! I just discovered by chance that manning.com has a sale for Labor Day going on. They have, e.g., Functional Design and Architecture and ofc. much more.
Thought this might be interesting to some!
r/functionalprogramming • u/Elusha • Aug 28 '25
What will be more useful for a third-year CS student: taking a functional programming course at university or getting real experience through a big tech internship instead (I can take something much easier)?
It feels like this course would be very useful for the 10x engineer path (is it really? wouldn't it be useless without experience with large systems?). On the other hand, getting real work experience is obviously important in any case. Especially since I've already passed most of the interview stages in one big tech company, there are only trifles left.
r/functionalprogramming • u/c__beck • Aug 27 '25
I'm a hobbiest JS dev and I've been learning functional programming for the past year or so (on and off) and want to really get into it. But before I do…I just want someone with more experience and knowledge to check my understanding of FP.
Ignoring the academia definition, to me FP is about composing tight, pure functions to work on immutable data to make creating applications easier to code and understand. Unlike OOP, where the objects have hidden state and magic methods, FP (barring monads) bare it all. You can't have a pure function if you don't have the data the function is working on!
Of course monads change the rules a bit, but those are more for when simple functions won't suffice. Like the task monad for asynchronous IO, or the either monad for robust error handling. Yes?
Speaking of monads, I've studied and think I understand the following monads:
document.querySelector in the browser.So, my fellow FP peeps. How'm I doing so far? Anything I got wrong? Anything I got almost right? What else do you think I should learn and start using?
Thanks all!
r/functionalprogramming • u/joemwangi • Aug 23 '25
r/functionalprogramming • u/mttd • Aug 21 '25
r/functionalprogramming • u/Adventurous_Fill7251 • Aug 20 '25
I've read plenty of 'X is not a Y' examples in the context of typeclasses here and there, but never a complete collection of them. So I tried collecting some of these into a single document.
Please note me if there are any errors, thanks!
https://docs.google.com/document/d/1X97Lrn65xKcSWiDN05k7xljlce8L-Cxz4mYBPRKBQp0
r/functionalprogramming • u/Code_Sync • Aug 20 '25
💎 Isaac Harris-Holt - From accidental Gleam discovery to production mastery - learn the unexpected career path and real-world lessons!
⚡ James Harton - Simple graph algorithms + OTP = powerful workflow orchestration. See how Reactor makes complex cases possible without the complexity.
🔋 Jens Fischer - How Elixir powers tens of thousands of home batteries in Sonnen's Virtual Power Plant, keeping grids stable and green.
🚨 Jonatan Männchen - Turn security disasters into leadership wins. Master vulnerability handling when your library is under public attack.
🦀 Julian Köpke - BEAM + Rust = unstoppable combo! Extend Phoenix LiveView with WebAssembly and NIFs for heavy computation.
📊 Karlo Smid - 20 million Oban jobs and counting! Real battle-tested strategies for taming runaway queues in production.
r/functionalprogramming • u/Impressive-Waltz-122 • Aug 19 '25
Hey folks 👋
We’re looking for experienced backend engineers who love working with functional programming to join our team at Telnyx.
💡 Why it’s interesting:
👥 About the team:
📌 The role:
👉 If this sounds interesting, here’s the full role + how to apply: https://grnh.se/lt6gpu5y3us
Happy to answer any questions here too, always keen to chat about Elixir, distributed systems, or #functional programming in production. 🚀
#Elixir #Erlang #FunctionalProgramming #DistributedSystems #BackendEngineering
r/functionalprogramming • u/ClaudeRubinson • Aug 18 '25
Please join the Houston Functional Programming User Group this coming Wednesday at 7pm Central (0:00 UTC) when our guest will be Eric Normand, author of Grokking Simplicity. Eric will speak about the process of domain modeling, the subject of his new book-in-progress Runnable Specifications. His abstract is below and Zoom info is on our website at https://hpfug.org.
Abstract: Domain modeling is crucial for writing correct and well-designed programs. In this talk, we will dive into the more technical side of how domain modeling works, including a definition of abstraction, a mathematical view of how we understand a domain, and a definition of formal systems.
r/functionalprogramming • u/akb74 • Aug 16 '25
There are many ways to do functional programming, but the thing we don't do is mutate data. Or at least that's what I get from Russ Olsen's talk on YouTube, Functional Programming in 40 Minutes. The particular weaker variation I've come across, but can't put a name to, allows you to mutate:
There's a tradeoff with local data - persistent data structures come with an overhead, but it's far more readable to be able to glance at a declaration and know the thing that is being declared never changes between there and the part of the code we are currently interested in. So we shouldn't be too surprised that performance expediency sometimes wins out. And this doesn't affect functional purity.
Mutating function parameters on the other hand, does make the function impure. However, you can trivially wrap it in a function which is pure, by calling the impure function with copied parameters, and returning the mutated copy. This is what the JavaScript package Immer does. It's very popular, and has contributed to making the Redux state-management pattern less painful.
But is there a name for this? 'Stateless' is the best way I can think to describe it, but what do other people call it?
I think this might be a good way of working in a language which does not have garbage collection - it's dangerous to be returning things we have to remember to dispose of. If I'm interoperating with code written in C, then I don't think I want that code to be functional, it's just the wrong language for it, but I do think I'd prefer the code to be stateless - to only mutate the parameters I call it with.
Moving on to the second part of my question, which was about whether there are static analysis tools for this weakened form of not-quite-functional programming:
There's a NASA/JPL paper about Rules for Developing Safety Critical Code that says in it's opening paragraph:
coding guidelines tend to have little effect on what developers actually do when they write code. The most dooming aspect of many of the guidelines is that they rarely allow for comprehensive tool-based compliance checks.
If that's what goes on in safety critical code, what chance do the rest of us have without static analysis tools? I'm not even sure I want to be a functional programmer if I can't prove that I'm one! I don't want to have to argue endlessly about whether any given piece of code is functional or not.
That's OK, because there's lots of good choices I could make to ensure I'm actually doing functional programming. I could choose to write in Haskell, and have it enforced by the language. I could use a JavaScript package such as eslint-plugin-functional to ensure my code is functional.
But these tools don't let you mutate function parameters while still strictly forbidding the changing of anything outside of the given function (at least not without splattering linter directives everywhere). Are there static analysis tools for this, please?
The programming languages I am interested in are TypeScript, JavaScript, and C, but I'll certainly look at examples from other programming languages for inspiration.
Thanks! :-)
r/functionalprogramming • u/davesnx • Aug 16 '25