Live data from Hacker News

If AI writes your code, why use Python?

medium.com

361–370 of 1001 posts

Re: If AI writes your code, why use Python?

#361

Earlier quoted context omitted.

Just use Go. LLMs have seen a ton of it, they write it well, it compiles practically instantly, and it has all the advantages of a typed compiled language. I created a big Python codebase using AI, and the LLM constantly guesses arguments or dictionary formats wrong. Unit tests and stuff like pydantic help, but it's better to avoid that whole class of runtime errors altogether.

But what is the selling point for Go? I get that it is allegedly hailed to be a simple language with basically no batteries included, but why is that a selling point? Does Go excel at anything no other language does?

>I get that it is allegedly hailed to be a simple language

That might be its core feature if you do agentic coding.

Re: If AI writes your code, why use Python?

#362
post #224

Earlier quoted context omitted.

I don’t think this holds at all, because the idea with a lot of vibe-code workflows is “humans never need to read the code” which would mean that human dev ergonomics are irrelevant. Here, the blog post is still clearly targeted at humans, so human reader ergonomics are still relevant.

Yeesh, is "never reading the code" really the modus operandi we want from AI? Microsoft, for all their warts, at least had the compassion to call their AI product "Copilot", suggesting we have some residual agency in whatever it is that it produces.

Copilot is a legacy brand from 2021 (anyone remembers it's free beta? good times) when it was just a rudimentary autocomplete powered by GPT-3. I don't think it aligns with Microsoft's views and priorities now.

Re: If AI writes your code, why use Python?

#363

It's strange to me that this blog post was written in English. If AI is available, why aren't we all communicating in Lojban? [0] It's an obviously superior language. What does it matter that many people already communicate in English and much of computing depends on that language? AI doesn't care about that. Plus, if you ever need to edit Lojban without AI, you should be able to pick it up in a few weeks, right? [0]…

Oh, I hadn't heard of lojban before. Cool project! Anecdotally, I think language effects the way you think more than most people realise, which is why I think a logical language is a great idea: it might "trick" people into thinking more logically! Now to get someone to actually speak it with!

If you’ve not heard of Lojban you may not have heard of Sapir-Whorf. Or you’re indirectly referring to it.

https://plato.stanford.edu/archives/win2011/entries/relativi...

https://en.wikipedia.org/wiki/Linguistic_relativity

Re: If AI writes your code, why use Python?

#364

Earlier quoted context omitted.

Performance? Second only to rust and other lower level langs. Surely you don't need this spelled out for you...

Java and C# are there and faster.

Yes, but kids these days only consider JS, Python, Rust and Go.

Re: If AI writes your code, why use Python?

#365

Earlier quoted context omitted.

Yeesh, is "never reading the code" really the modus operandi we want from AI? Microsoft, for all their warts, at least had the compassion to call their AI product "Copilot", suggesting we have some residual agency in whatever it is that it produces.

It's clearly not the MO that capable engineers want, but it's the MO that is getting funded right now. Reading code carefully is harder than writing code unless the code is written consistently and clearly in a way that is idiomatic to the reader. And there's way more code to review now, but companies aren't scaling up the number of skilled engineers on staff. So in practice, never reading all of the diffs is the MO…

> It's clearly not the MO that capable engineers want, but it's the MO that is getting funded right now.

Quite a few capable engineers really are that short-sighted!

The bigger question for the AI-techbro questioning "If AI writes your code, why use Python?" is "If AI writes your code, what use do we have for you?"

After all, there's dozens of people in the same business that have better domain knowledge but are unable to program - as a programmer the only value you added over random analysts and clerks was that you could automate shit.

Now you can't, so good luck competing with people who were already making half your salary when your largest value-prop is now gone.

Re: If AI writes your code, why use Python?

#366
post #103

Read 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?

That would matter if we were asking the AI to generate code open-loop: someone probably already wrote something close to what you asked for in Python. But if the agent generates code, tries to compile it, sees the detailed error messages and acts on those messages to refine the code, it's going to produce a higher quality result. rustc produces really good diagnostics. And there's a lot of Rust code online now, even…

Except the presence of errors, mistakes, contradictions, and doubling-back causes LLMs to have substantially worse output, especially without dedicated sub-agents who have been instructed about that deficiency and know to process that kind of crap into better prompts to insert into a different LLM with pristine, error-free context. Without hard numbers we're both just pissing into the wind, but it's entirely plausible that the higher rate of errors matters more than the fact that those errors are more ergonomic. Anecdotally, my LLM work is a _lot_ more productive when I have it draft the thing in Python and translate it into Rust since it wastes so much time on the tiniest of syntactic mistakes.

Re: If AI writes your code, why use Python?

#367
> Nicholas Carlini, a researcher at Anthropic, orchestrated 16 parallel Claude agents to write a production C compiler in Rust.

No he didn't. The compiler is bascially useless as it produces vastly inferior code than gcc/clang.

Re: If AI writes your code, why use Python?

#368

It's strange to me that this blog post was written in English. If AI is available, why aren't we all communicating in Lojban? [0] It's an obviously superior language. What does it matter that many people already communicate in English and much of computing depends on that language? AI doesn't care about that. Plus, if you ever need to edit Lojban without AI, you should be able to pick it up in a few weeks, right? [0]…

AI has not been trained on Lojban. And furthermore, this article is almost certainly primarily intended to be read by humans directly. I understand you're being facetious, but I'm not sure what point you're trying to make about programming languages in comparison.

> And furthermore, this article is almost certainly primarily intended to be read by humans directly.

No, it's intended to generate traction for the author who lists his primary occupation as "building AI coding tools".

His goal is not the same as your goal.

Re: If AI writes your code, why use Python?

#369

Read 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?

Surprisingly, LLMs are actually much worse at reasoning in Python than other common programming languages for agentic coding tasks. Data here: https://gertlabs.com/rankings?mode=agentic_coding

I’m super surprised that C++ scores so high, this does not match our experience at all, and for anything performance critical it always drops the ball completely.

I also don’t understand how these “games” map to real world complex problems. How are you measuring success? How does “adversarial customer service” map to “this LLM is better at C++ than the other” ? How are you sure you’re not just benchmarking language suitability for a problem ?

I have so many questions about this…

Post reply on HN