Xcode’s predictive code completion is worse than nothing

Unlike some of my friends, I’m not the biggest fan of the kind of AI code completion that tries to write blocks of code for you as you type, but I was still kind of excited to see what Apple’s version of that in Xcode would look like and wanted to give it a try.

On paper, it could be great. Xcode indexes all your code and knows everything about your project. Apple controls the entire experience, so the integration between the editor and LLM could be deep and relevant to your project’s code. As soon as you try it, you realize that’s not true. Wherever it’s pulling suggestions from, it doesn’t appear to have any kind of meaningful understanding of your project. Bummer.

The suggestions not being that good isn’t why I had to turn it off — sometimes they’re all right. Not close to as good as Copilot, but okay sometimes. The reason I had to turn it off, and the thing that is absolutely mind-boggling about the feature, is that it makes basic syntactic mistakes all the time. Things like putting the end quote in the wrong place or leaving off parentheses. Every time it made a mistake like this, I had to spend one or two minutes staring at the line, trying to find the error.

That’s not just bad; that’s worse than nothing. The good news is that engineers inside Apple use Xcode too, so I’m certain the team knows how much love predictive code completion needs. Hopefully, they’re spending the time and energy so that this year or next it can go from what it is now to what I was hoping it could be.


Leave a comment