Live data from Hacker News

If AI writes your code, why use Python?

medium.com

111–120 of 1001 posts

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

#113

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?

No if that mattered you'd write everything in html and css. Because that has way more training data.

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

#114
post #67

I know a couple languages fairly well: C, Perl, Python, Bash. I never formally learned Go, but as a test of AI coding, I started some vibe coded projects in Go. It worked very well: the code is minimal, there's few dependencies, and it compiles down to a static app. But most importantly, I can actually read the Go code and understand basically what it's doing. I can also use LLMs to critique the code if I'm uncertain…

> I have a co-worker who's basically not a programmer, but got multiple implementations of applications working sooner than our dev teams Deployed to production, right? Right?? (I’m just kidding, of course it’s only on their machine, no different than Excel 5 years ago) > architect and orchestrate the coding, but 'language' isn't a barrier anymore. Never was the barrier.

Here's the kicker: The devs spent nearly 5 months on a solution, and it ended up being so crap it was abandoned. The multiple vibe-coded solutions were all better.

Of course language was the barrier, that's part of why it was always hard to hire people. It takes years to get good at a particular language, and most people are idiots from bootcamps who learned a single framework.

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

#115

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?

No if that mattered you'd write everything in html and css. Because that has way more training data.

Those are not programming languages.

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

#116
post #93

Earlier quoted context omitted.

Training data can't be the whole answer. LLMs are really good at translating to different programming languages. This makes sense, given that they are derived from text translation systems. I'm getting great results in languages with comparatively small bodies of freely available code. The bigger hurdle is usually that LLMs tend to copy common idioms in the target language and if it is an "enterprise-y" language like…

> LLMs are really good at translating to different programming languages. ...for which ample training data is available. > This makes sense, given that they are derived from text translation systems. ...for languages with ample training data available. Yes, LLMs can combine information in novel ways. They are wonderful in many respects. But they make far more mistakes if they can't lean on copious amounts of training…

That might be an argument for not using a novel homebrew programming language. But it's not an argument against, like, any top-100 or even top-1000 programming language, which will be adequately represented in the training data.

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

#117
This idea is already being taken to the next step in labs; why generate code?

When I run a game I don't care of the dev used C or whatever. Only programmers care about the syntactic representation.

I need the machine code/byte code patterns/geometric/color gradient data.

Eventually Python will be what you see on screen but no cPython interpreter program as we know it will be running

The model will have an internal awareness of the result to return without running an actual REPL

https://dev.to/zijianhuang/prompt-to-ai-generated-binary-is-...

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

#119
post #29

AI's are really good with Python. Quick turnaround. Easy to read. Tons of training data/examples. Many of the same reasons we wrote Python before. Another benefit to using Python, is if you subscribe to writing/vibing a throwaway version first, a Python version is 100x better than a spec. (Disclaimer: I teach Python and AI for a living and am doing a tutorial at pycon this week, Beyond vibe coding. Am also using othe…

Problem with Python and other non-strict typed languages is that if you let an LLM to write some stuff, you cannot truly be confident that nothing has broken. Even if your tests all pass. The LLM could have broken some path that only gets run in production in a very specific case. At least with strongly-typed languages you get a compiler error. In big codebases is non-negotiable

This is why you should use Haskell.

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

#120
post #19

Earlier quoted context omitted.

Type safety feels like the big one; anything you can shift to static/compile-time regimes benefits agents immensely.

There are two working LLM axes. Critic strength: how much the language catches before runtime. Sensor strength: how good the empirical feedback loop is. LLMs benefit from both, but the sensor axis often is undervalued. Type safety is great, but you can't just quietly disregard the benefits some dynamically typed languages provide; that would be completely ignoring that different tasks weight the two axes differently.…

Using Clojure and Elixir and LLMs are fantastic with both. Sure, if I get to a super-stable situation then maybe I'd consider moving to Rust (or Jank?), but for now I'm just so happy with Clojure and Elixir in this new world. I'm solving new problems with fully bespoke architecture so the flexibility is key. Clojure for business logic and most DB. With Elixir, it's the actor model and hand-holding as I'm using it for the web layer. I bet Ruby on Rails would also shine for some cases, prob most CRUD for example.
Post reply on HN