2 ms·
Could be a symptom of which languages we use and which languages are in their training sets. I primarily write F#, which is a functional language that's compati
by nozzlegear 2mo ago
Could be a symptom of which languages we use and which languages are in their training sets. I primarily write F#, which is a functional language that's compatible with the object-oriented C#. When AI tries to write code in my F# codebases, it almost always ignores the existing patterns/styles and tries to write it like an OO language. It has a weird desire to use mutability instead of the default immutability, for loops instead of pipes/monads, huge if/else blocks instead of pattern matching, etc. This is all very un-idiomatic for F#, not what a human programmer would write unless they were deliberately trying to write it like C#.
Maybe it's better in Fable/Sol, but it was a problem in Opus when I still used Claude, and it's still a problem with the Qwen and Deepseek models I use now. Either way, it seems to me that your code has to already conform to the patterns they want to write, or you're going to end up with new patterns.
- lukebitts 2mo agoTo be fair, I do have to remind the AI to follow the codebase's conventions regularly and it is the #1 rule in our team's claude.md. And when I generate plans I ask that every new implementation follow a reference implementation. In your F# projects would something like that help or would it make no difference?
- nozzlegear 2mo agoYeah that's what I've ended up doing and it does help. I do have guidelines set up in my agents.md files, but they're hit or miss. It's best to just tell them directly to "write idiomatic F#," which they seem to understand.