That's interesting, I thought Claude or Codex would be really good with it. I've been doing some FPC/Lazarus work with Gemini 3.8 Flash, working on a program that creates STLs, DXFs, and SVGs of involute gears for machining or 3-d printing with a nice "Gear Designer" and visual preview and the code has been perfect. I enjoy building the UI and write the UI logic myself, but the exporters and gear calculations are beyond my capabilities and everything Gemini's done has been basically flawless. I have no dependencies beyond the RTL and LCL, not using any libraries to help with the format exports. Seem's like the opinion here is that Claude and ChatGPT do way better code than Gemini, so I'm surprised you've had issues.
The only minor problems I've had is Gemini went through a phase where it was using semi-colons improperly in if statements, which is something everybody messes up with Pascal, so forgivable, I'm sure if I was using an agent rather than the web interface it would have figured it out from compiler errors right away. That and sometimes with UI stuff it would hallucinate methods or properties for components that are part of commercial delphi components, but I've only ran in to this 2 or 3 times.
When I first started on this project I believe we were on early Gemini 3 and I will say it's handling of Pascal constructs was quite rough, it seemed to have a lot of trouble with the verbosity. Lot's of extra tokens to grok the structure vs something like C or Go. But from 3.5 onwards it's been flawless.
Maybe it's just one of those things Gemini is simply better at. I'd much rather read Gemini prose than Claude, and Pascal is definitely closer to natural language than something like Rust might be. On the other end of the language spectrum I find it is incredibly good with Go as well, I think Google might have a bit of an edge as far as high quality training material for that language goes.
The only minor problems I've had is Gemini went through a phase where it was using semi-colons improperly in if statements, which is something everybody messes up with Pascal, so forgivable, I'm sure if I was using an agent rather than the web interface it would have figured it out from compiler errors right away. That and sometimes with UI stuff it would hallucinate methods or properties for components that are part of commercial delphi components, but I've only ran in to this 2 or 3 times.
When I first started on this project I believe we were on early Gemini 3 and I will say it's handling of Pascal constructs was quite rough, it seemed to have a lot of trouble with the verbosity. Lot's of extra tokens to grok the structure vs something like C or Go. But from 3.5 onwards it's been flawless.
Maybe it's just one of those things Gemini is simply better at. I'd much rather read Gemini prose than Claude, and Pascal is definitely closer to natural language than something like Rust might be. On the other end of the language spectrum I find it is incredibly good with Go as well, I think Google might have a bit of an edge as far as high quality training material for that language goes.