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
11
u/lgastako Sep 02 '25
This hasn't been my experience. In my experience the type errors provide a decent enough amount of information that they can usually work them out, at least in normal line of business type of code.