Functional programming also helped get ride of bugs before, and still people used other paradigms. Why would we change now? How to know that functional programming is indeed better for vibe coding?
It should be better for the reasons explained in the article. Pure functions require no context to understand. If they are typed, it's even simpler. LLMs perform badly on code that has lots of state and complex semantics. Those are hard to track.
In fact, synthesis of pure Haskell powered by SAT/SMT (e.g. Hoogle, Djinn, and MagicHaskeller) was already of some utility prior to the advent of LLMs. Furthermore, pure functions are also easy to test given that type signatures can be used for property-based test generation.
I think once all these components (LLMs, SAT/SMT, and lightweight formal methods) get combined, some interesting ways to build new software with a human-in-the-loop might emerge, yielding higher quality artifacts and/or enhancing productivity.
That's a very fair point. There are some publications showing lower performance for languages with less training data. I imagine it also applies to different paradigms. Most training code will be imperative and of lower quality.
it’s not discussed in this post but in another right after I discuss the modeling I was doing on tech debt and finding the game to improve agent outcomes was reducing context.
functional programming accomplishes that. I can’t claim it’s the only way, but it’s one that’s well understood in the community
What makes is special about "agentic development" vs reducing context requirements, reducing cognitive burden, etc for human development too? "A human developer builds a mental model of a codebase over months"—yeah, that makes onboarding to a codebase very time consuming, expensive, and error-prone.
So why is "better for agents" distinct from "better for humans"?
Agents can simply be told to write code in a functional style. They won’t complain. Think of it like a constraint system or proofs system. The agent can better reason about the code and side effects. Etc.
Agents are very good at following and validating constraints and hill climbing. This makes sense to me. Humans benefit too, but it is hard to get a bunch of humans to follow the style and maintain it over time.
Agents are useful because they don't inherit context from their parent context. They're basically "compaction" at a small scale. They succeed because context pollution create greater indeterminancy. The fact that you can spin up many of them is not primary benefit of them.
>finding the game to improve agent outcomes was reducing context
I think modularization will further reduce context. I am planning to play with your SUPER and SPIRALS idea and use modularization on top via Vertical Slice Architecture or modular monolith where each module is isolated and has a contract.
Because previously people had to write code themselves and they had personal preferences. Because the bugs were less when written by a human.
Now personal preferences doesn't matter as much since people won't change the code themselves too much. And because LLM can introduce lots of bugs and make a mess in the code unless you can restrict them somehow.
In fact, synthesis of pure Haskell powered by SAT/SMT (e.g. Hoogle, Djinn, and MagicHaskeller) was already of some utility prior to the advent of LLMs. Furthermore, pure functions are also easy to test given that type signatures can be used for property-based test generation.
I think once all these components (LLMs, SAT/SMT, and lightweight formal methods) get combined, some interesting ways to build new software with a human-in-the-loop might emerge, yielding higher quality artifacts and/or enhancing productivity.