Hacker News new | ask | show | jobs
by sleepy_keita 23 days ago
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.
2 comments

PHP changed a lot since its early days. To the point where anything old would be considered bad practice by contemporary ecosystem point of view. So duration is not all. Comparatively, C seems to have stick to the same idiom all the way. That's not to praise C style form here to be clear, which is ridiculously obfuscating and feeling like pointless collection of linguistic awkward atrocities. But at least it's consistent in doing it.
I would also bet that 90% of Swift training data is UI code.

And UI code quality tends to be technically pretty crummy/low-discipline. Your UI code doesn't need much consideration around data races, for example.

You wouldn't know that, if you looked at the UI code the LLM gives me. It loves threads; often mixing GCD and async/await, in one function.

A lot of the code I need to tear out, looks like that.

Most of the code I write is UI. It's actually fairly intense work, but relies on the underlying SDK, rather than language tricks.

I find the UIKit code I get, is a lot more robust and performant, than the SwiftUI code.