logoalt Hacker News

ChrisMarshallNYtoday at 9:15 AM2 repliesview on HN

I program in two languages: Swift (my main language), for client work, and PHP, for backend work. It’s overwhelmingly Swift.

In the last year or so, I have been using LLMs, to assist my work, with generally, excellent results.

I have noticed that the LLM delivers much better PHP, than Swift. I seldom need to rewrite or correct, the PHP code I get from it, and am constantly correcting the Swift. Part of the reason, may be that I am a much better Swift programmer, than PHP programmer, and there’s just a lot more Swift code. I haven’t really taken the time to analyze it.

I have my theories, as to why, but it’s not something I’m really into researching. I’ve just noted the trend.


Replies

sleepy_keitatoday at 9:19 AM

I think it's pretty simple - there's just so much more open source PHP code out there in the LLM's training dataset. Swift has been around for much less, and most Swift is closed-source - not that many years have passed since Swift has been able to run on non-Apple platforms, too.

show 1 reply
dust-jackettoday at 9:21 AM

> Part of the reason, may be that I am a much better Swift programmer, than PHP programmer

Hard not to think that's a major part of it. IME you make loads more corrections in languages you're more opinionated about (and opinionated usually follows more experience & confidence).

I correct AI Python all the time. When it cranks out TypeScript I just check it works.