4 ms·
Might be because there are less Swift projects to train with. But I've seen Claude write crazy code in Python and JavaScript, too
by altern8 4mo ago
Might be because there are less Swift projects to train with.
But I've seen Claude write crazy code in Python and JavaScript, too
- ChrisMarshallNY 4mo agoMy theory is that most of the Swift code in the public domain, is basically demo code. Short, idealized, code samples to demonstrate issues and solutions; much like you would see in StackOverflow. PHP has huge, entire frameworks and systems, refined over years.
- graemep 4mo agoThere is also a lot of low quality PHP code out there, and a lot of legacy code in a language that I am told (I have not used if for years myself though) has changed a lot.
- ChrisMarshallNY 4mo agoSame with C++. You don't want to write C++, the way that I used to. That's one of the things that I appreciate about the PHP that the LLM provides. It uses modern idioms that make better use of the modern language.
- graemep 4mo agoI do not know about crazy, but certainly sub-optimal. For example a loop over DB query results instead of modifying the code to work with a single query.
- ChrisMarshallNY 4mo agoI found that asking it to refactor for performance and safety often addresses these issues.