If AI writes your code, why use Python?
851–860 of 1001 posts
Re: If AI writes your code, why use Python?
#852Earlier quoted context omitted.
It seems clear to me from first principles. Humans are trained on human language. LLMs are trained on human language. Thus something that is easier for a human to understand is likely easier for an LLM to understand. That higher level language with well named variables reads more comprehensibly than code:VERB with:PREPOSITION types:NOUN, intermixed:ADJECTIVE, stems:VERB from:PREPOSITION first:ADJECTIVE principles:NOU…
As far as the AI is concerned, it's more like Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo versus Buffalo:PN buffalo:N Buffalo:PN buffalo:N buffalo:V buffalo:V Buffalo:PN buffalo:N I think the second one makes much more sense.
The majority of the time you can infer the type from reading well written code (to the extent that the shape of the type matters in the context of that piece of code)
Re: If AI writes your code, why use Python?
#853Re: If AI writes your code, why use Python?
#854The static vs dynamic language debate is decisively over and static has won. I called this out back in 2023, and I've only become more convinced since then. Statically typed languages are easier for the reader because you can see the types and quickly jump to their definitions (or even just hover over them in some IDEs). They're easier for the AI because they provide natural guardrails and feedback to guide it, as we…
If static has won, why are dynamic languages more popular now (even since 2023). Comically, I’ve witnessed people say this since the 90s. For me, I don’t care about static because dynamic is easier. For the very few conditions where it matters, I’ll use static. Otherwise I like the simplicity of dynamic languages, especially python. IDEs provide support and jump to definitions in dynamic languages, too.
However I've definitely noticed that the larger a ruby program gets, the more likely I am to manually add type checks. Beyond a certain size I simply can't fit everything in my head at once. Even though these checks are still done at run time, debugging is much easier when I can find out ASAP when something is not what I expected it to be.
People often say "that's what tests are for!". But if I'm spending time writing tests that verify the types are correct, I see that as a waste of my time because that's exactly the kind of thing that a compiler could do for me in a statically typed language.
Re: If AI writes your code, why use Python?
#855Re: If AI writes your code, why use Python?
#856Earlier quoted context omitted.
As far as the AI is concerned, it's more like Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo versus Buffalo:PN buffalo:N Buffalo:PN buffalo:N buffalo:V buffalo:V Buffalo:PN buffalo:N I think the second one makes much more sense.
In the rare case that all your concepts use the exact same descriptive word, you are probably right! The majority of the time you can infer the type from reading well written code (to the extent that the shape of the type matters in the context of that piece of code)
Re: If AI writes your code, why use Python?
#857The static vs dynamic language debate is decisively over and static has won. I called this out back in 2023, and I've only become more convinced since then. Statically typed languages are easier for the reader because you can see the types and quickly jump to their definitions (or even just hover over them in some IDEs). They're easier for the AI because they provide natural guardrails and feedback to guide it, as we…
Hard disagree, LLM's benefit from jacking in to the powerful nREPL dynamic languages in the Lisp family like Clojure, letting the agent manipulate the code in unprecedented ways.
Re: If AI writes your code, why use Python?
#858The static vs dynamic language debate is decisively over and static has won. I called this out back in 2023, and I've only become more convinced since then. Statically typed languages are easier for the reader because you can see the types and quickly jump to their definitions (or even just hover over them in some IDEs). They're easier for the AI because they provide natural guardrails and feedback to guide it, as we…
Strong typing has clearly won. However, verbose typing is likely a negative for LLMs. Algorithms written in "pseudo-code", aka a higher level language without type information, are far more readable to a human, and thus likely an LLM too. In regards to control flow and general concept of what code is doing, types provide very little info over well named variables. In fact they often impair understanding by breaking u…
Re: If AI writes your code, why use Python?
#859Earlier quoted context omitted.
> The static vs dynamic language debate is decisively over and static has won I wouldn't be so fast. It wasn't that long ago that the dynamic zealots were declaring victory. And before that the static zealots. And before that the dynamic zealots. Going back decades.
That kind of back-and-forth dynamic ideally ends up with something combining the best parts of both approaches. Is anything like that happening?
Reduces manual boilerplate and visual noise while retaining static typing semantics.
Re: If AI writes your code, why use Python?
#860Earlier quoted context omitted.
I think most people agree with you -- that's why. Also because I'd say most programmers don't care much about maintainability or quality. I personally find that AI writes better Scala than Python.
Before AI, I used to say types reduce quality by wasting dev time that could've been spent on testing. They may also encourage overly complex code. With AI, I don't know. If we're forced to use types, the AI does that work for me, but that added verbosity can't be good for it.
To me, this argument sounds similar to “making salads to eat reduces health because they waste time that could’ve been spent on working out” - it assumes the time savings will be spent on working out and not on sitting on the couch.
In the case of SWE, any time saved will always be spent on “2 more features we think we can ship this sprint if we deprioritize these pesky ‘additional tests’ tickets - don’t worry, we’ll circle back to those next sprint of course”