I really like the “functional core, imperative shell” approach, I try to use it whenever I can. I wish more non-FP languages had a way to mark a function as pure (and have this statically enforced).
Functional programming accelerates agentic feature development
31–34 of 34 posts
Re: Functional programming accelerates agentic feature development
#32Earlier quoted context omitted.
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.
Hmm? How does this relate to functional programming helping agents code better?
You're treating an agent like its something other than an LLM with limited context. I'm just trying to surface a incorrect assumption.
You're just talking about LLMs. Whether they're a child of a primary LLM is irrelevent to your conception.
It'd be interesting if you posited that LLMs doing functional style could handle more context without service degradation.
Re: Functional programming accelerates agentic feature development
#33I've been having good luck with fairly autonomous LLM coding with the following rules: * TypeScript everywhere with extreme enforcement of the type system. * No "as" casts, no "any" declarations, all code must understand the shape of its data * All boundaries validated using a typed validation library. Many use zod, I prefer tjs. I also have strictly typed pg and express wrappers. * No files longer than 300 lines * A…
How do you enforce the use of validation library with eslint?
Re: Functional programming accelerates agentic feature development
#34Earlier quoted context omitted.
OP Here: 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
>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.