Anyone else find that LLMs have more trouble with declarative (as opposed to imperative) code? Maybe lack of training data or more difficult to follow chain-of-thought?

Reply to this note

Please Login to reply.

Discussion

Which LLMs and languages did you try?

I noticed this on o3 with Swift UI files. Have you had better luck with others?

I've mostly tried Claude Sonnet, haven't noticed a stark difference between imperative and declarative languages, at least it does well on SQL. I tried some functional programming, was quite ok