In my experience, using functional programming principles is really helping the quality of code produced by Claude and Codex. I am currently using Typescript with very strict config, and custom lint rules to enforce architecture. I have types for every API endpoint, including the params that the endpoint accepts and the type of its response, and raw fetch is banned - there is a typed API client that defines which endpoint it calls, thus ensuring that endpoints and callers can’t get out of sync. It’s working really well for me, but I want more… I’m experimenting with Haskell (which I know well-ish, but I’m not super experienced in), and I’m surprised that Claude and Codex are actually fairly capable of writing good Haskell code. Haskell’s type system is an order of magnitude stricter/stronger/more flexible than Typescript, and much of what I’m trying to do with Typescript is taken care of by default in Haskell. The ecosystem is a bit painfully sparse for web application stuff (finding a S3 client library that didn’t look like it hadn’t been maintained for years was hard), and for frontend JS you still either need a Typescript frontend (losing some of the magic of Haskell), or some Haskell-to-JS solution (big bundle sizes), or some other solution like Elm (niche language). Have others had success with more purely functional languages? Does anyone resonate with my sense that FP is the way to keep LLMs on the straight and narrow? submitted by /u/WhatIsANameEvenFor
Originally posted by u/WhatIsANameEvenFor on r/ClaudeCode
