logoalt Hacker News

nozzlegeartoday at 2:13 PM0 repliesview on HN

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.