One underrated advantage of using Python or Typescript is that AI agents can inspect the code of installed dependencies. This means you don't have to muck around with supplying the right documentation for each version of each dependency, or worry about hallucinated interfaces (at least with the latest models). In the past you'd have to dig through a foreign codebase manually to figure out why a documented interface f…
If AI writes your code, why use Python?
481–490 of 1001 posts
Re: If AI writes your code, why use Python?
#482Well, I'd still want something I can read... Asking Clodex to build me a hello world web backend in Rust, Go, Python: Python is read with great ease. Go is fine too, a bit verbose but still ok. Rust hurts my eyes. I'd settle with Go for this use case.
> Nicholas Carlini, a researcher at Anthropic, orchestrated 16 parallel Claude agents to write a production C compiler in Rust. 100,000 lines. It boots Linux 6.9 on x86, ARM, and RISC-V. It compiles QEMU, FFmpeg, SQLite, PostgreSQL, and Redis. It runs Doom. Total cost: just under $20,000 across nearly 2,000 Claude Code sessions.
Anyone who spends even 10% of an unhealthy tome on Hackernews should be able to confidentially say: It didn't boot, it didn't compile, and it did not run a Hello World, much less doom. It was a 20 thousand dollar fiasco and a joke.
https://news.ycombinator.com/item?id=46941603
Of course you want code you can read. You live in the real world, and have a real world use case. One where you haven't yet learned to review Rust code. TFA does not live there.
Re: If AI writes your code, why use Python?
#483Earlier quoted context omitted.
> A plain HTML page with no CSS is a near-perfect reading experience. The problem is that almost nobody ships that, because the web also became a publishing platform where authors compete for attention. They don't ship it because of greed. They only want your attention because of greed. They only infest their website with ads because of greed. > The browser is a delivery mechanism, http is a delivery mechanism. The b…
> It's supposed to display content according to the preferences of the user. That's right, the original idea was exactly about that, but like I said - in practice that is no longer a thing. Using the editor for reading any content is enormously underrated. Check this out - this entire thread opens in my editor as an outline with nested structure. Meaning that all the regular outline operations are available to me - f…
Re: If AI writes your code, why use Python?
#484One 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…
I never really understood what exactly is so readable about python. I've been developing in Python for 8 years now, and before that I was a C# developer, and I don't find Python to be that more readable. Sure there's less ceremony, and yes, you can have your project going with just a single file, but other than that...?
Less ceremony and boilerplate means more readable code.
Re: If AI writes your code, why use Python?
#485Re: If AI writes your code, why use Python?
#486Earlier quoted context omitted.
> A plain HTML page with no CSS is a near-perfect reading experience. The problem is that almost nobody ships that, because the web also became a publishing platform where authors compete for attention. They don't ship it because of greed. They only want your attention because of greed. They only infest their website with ads because of greed. > The browser is a delivery mechanism, http is a delivery mechanism. The b…
> It's supposed to display content according to the preferences of the user. That's right, the original idea was exactly about that, but like I said - in practice that is no longer a thing. Using the editor for reading any content is enormously underrated. Check this out - this entire thread opens in my editor as an outline with nested structure. Meaning that all the regular outline operations are available to me - f…
Re: If AI writes your code, why use Python?
#487Read the first few comments and surprised I didn’t see it, but training data. The voluminous amount of Python in the training data. I could write in brainfuck with ai, but I presume, wouldn’t get the same results than if going with python. My follow up question: with AI now, why care about a lang until you need to?
Re: If AI writes your code, why use Python?
#488How about modern Java? Any experiences?
The reason why Java is such a terrible choice now is not technical, it's the Lawnmower Nazi argument: https://news.ycombinator.com/item?id=15886728 masklinn on Dec 9, 2017 | parent | context | favorite | on: Larry Ellison allegedly tried to have a professor ... And remember, > Do not fall into the trap of anthropomorphising Larry Ellison. You need to think of Larry Ellison the way you think of a lawnmower. You don't…
Re: If AI writes your code, why use Python?
#489One 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…
I never really understood what exactly is so readable about python. I've been developing in Python for 8 years now, and before that I was a C# developer, and I don't find Python to be that more readable. Sure there's less ceremony, and yes, you can have your project going with just a single file, but other than that...?
Re: If AI writes your code, why use Python?
#490One 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…
I would assume it's important to know what's in that training set too Because I get reliable generation out of "niche" languages already Is it code with lots of SQL injections used in a different domain to your own? It's maybe not good to conflate quantity with quality