One obvious reason is Python's extreme readability, it has often been described as being as close to executable pseudo-code as one can get. If you're using an LLM to write code I think the rules would be 1. Use a language you know really well so you can read it easily, and add to it as needed. 2. Use a language that has a large training set so the LLM can be most efficient. 3. Use a language that is easy to read. If…
If AI writes your code, why use Python?
741–750 of 1001 posts
Re: If AI writes your code, why use Python?
#742Earlier quoted context omitted.
What would comparing rates across languages tell in the context of this benchmark? Are the tasks the same or robustly difficulty-normalized across the languages? Also somehow the 2 language comparison graphs (avg percentile and success rate) rank Python in dramatically different positions, with Python outranking Rust and Java in the success rate. What does the avg percentile mean in this context?
Success rate measures the amount of code submissions that played the game/environment without failing (compilation, breaking game rules, violating sandbox, etc.), so it makes sense Python would do better there. Percentile compares only the submissions that didn't hard-fail. So they are a bit different, and we incorporate them both into the combined score.
Re: If AI writes your code, why use Python?
#743Earlier quoted context omitted.
They have made an honest attempt to pay writers. It's a different model than substack, but that's why. I look at it the same way I look at pay walls for newspapers. I don't like them but I understand why they are there.
Which is why it failed though. It turns out people won't pay one dollar to read an article like "If AI writes your code, why use Python?" The situation is very unfortunate. We had perhaps once-in-a-lifetime chance to solve micropayment but we fucked up (crypto).
Re: If AI writes your code, why use Python?
#744Most of the article makese sense but what is this supposed to mean? "Native Rust binaries are hostile to serverless runtimes" . I don't think that is true.
Re: If AI writes your code, why use Python?
#745Earlier quoted context omitted.
This must really depend on your niche. I assume you do web stuff or something? Good luck finding any golang examples in a lot of other fields. Rust, on the other hand, is taking over the world in systems programming.
> Good luck finding any golang examples in a lot of other fields. There are go examples (and full blown programs) for anything, from servers to Kubernetes and Docker.
Re: If AI writes your code, why use Python?
#746Earlier quoted context omitted.
I would love to see how they do with functional languages and especially Lisps here. I've noticed pretty good performance with Emacs Lisp relative to overall model strength, but I haven't used LLMs to application code in any such languages. It would also be interesting to see how Python compares to other languages in its niche (Ruby, Perl, Raku). Thanks for putting this together! It's interesting.
I've noticed that with clojure(script) unless you specifically instruct them to keep nesting levels low, they can hit a point where they make a paren placement error and can't debug their way out of it. Although in my case while one model made the error then couldn't find what it had done, a second model that I switched to was then able to identify it and back it out. So I suspect this is a transient weakness in toda…
Re: If AI writes your code, why use Python?
#747Even if an agent generates 90% of the code, each and every diff is going to be in my review queue. Code readability of Python isn't an advantage during write; it's an advantage while reviewing. As an agent generates a piece of code, I will have to read the code, comprehend the code, and determine whether it does what I want. This is the other 10% of the task, and it's the crucial one.
Python is, thus, clearly superior to other languages in terms of ease of review.
Re: If AI writes your code, why use Python?
#748Earlier quoted context omitted.
1. Amount of Rust training data isn’t as much as Go. 2. Golang syntax and style is very verbose yet simple. There’s not as many options nor programming language to domain mapping needed as in Rust. Leads to needing less sophisticated LLM to spit out Golang than Rust successfully and efficiently.
This must really depend on your niche. I assume you do web stuff or something? Good luck finding any golang examples in a lot of other fields. Rust, on the other hand, is taking over the world in systems programming.
Re: If AI writes your code, why use Python?
#749Re: If AI writes your code, why use Python?
#750Earlier quoted context omitted.
Come on now, how do you learn anything if you just tell claude to do something and feed it error messages?
Yeah, I don't think you really learn a language with agentic coding, at least you wont become fluent writing it. I currently use copy pasta chatbot help to write some C code and I am still often stuck how to progress manually. And I refactor a lot because the LLM code is subpar for me.
> Yeah, I don't think you really learn a language with agentic coding
> [...]
> And I refactor a lot because the LLM code is subpar for me.
This is learning.