r/functionalprogramming • u/n_creep • Sep 02 '25
OO and FP Make Illegal AI Edits Unrepresentable
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
View all comments
Show parent comment
5
u/OptimizedGarbage Sep 02 '25
There's a huge amount of work on LLMs with dependently typed languages (in particular Lean). That's increasingly how they're training reasoning models