frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

If AI writes your code, why use Python?

https://medium.com/@NMitchem/if-ai-writes-your-code-why-use-python-bf8c4ba1a055
55•indigodaddy•1h ago

Comments

niek_pas•1h ago
Bit off topic but why in the world are people still posting on medium? The reading experience is abhorrent; I couldn’t even finish reading this article before a full screen popup literally blocked the sentence I was reading.

Is there some incentive I’m not seeing?

nickff•1h ago
It seems like it's just the latest evolution of the writer-friendly blogging platform; easier than Wordpress to package into a newsletter, and also easier to monetize with a paid tier.
dsmurrell•1h ago
Yep, Medium was free and everyone donated content... then it put up reading paywalls and conned everyone, I'm also surprised when I see people writing on there.
chneu•1h ago
My best guess is momentum. Some people are very, very brand loyal and have to do things in relation to what/how others do things.

In reality it doesn't matter where something is posted, just give us a url, but some people don't operate that way.

schmookeeg•1h ago
I assume this is why things like PyO3 are popping up? If so, sort of a fascinating way to compartmentalize new rust code into legacy .py code in lieu of a refactor, or at least, a way to do a staggered refactor and eat the elephant in bites :)
tontinton•1h ago
Also easier to ship a binary like a cli
lenerdenator•1h ago
1) I still have to comprehend it.

2) The corpus for the sort of applications I build is likely larger for Python than it is for C++ and Rust. Bigger corpus == more training data == better generated code.

3) The bottleneck in the applications I run aren't in the execution of the code; they're in the database/network latency.

4) I don't get anything extra for pushing Rust or C++ over Python.

pacificpendant•1h ago
If all the libraries are rust as the article claims having the top layer in Python probably makes even less difference.

I tend to agree with the article’s statement about the value of the test code though, may even have been true before LLM code took over.

kylec•1h ago
This post resonates. I recently built a little web service to scratch an itch I've been having and after discussing the options with Claude we settled on Go, and honestly it's been fantastic. Highly performant, native threading, dead simple to deploy with containers. And I don't even know how to read or write Go.
queenkjuul•52m ago
Go is fun, you should actually learn it
kylec•41m ago
I did go through the Go tutorial many many years ago, but it's been so long I don't remember anything. I do remember it was an enjoyable process though, and I'd love to pick it up again.
xtracto•33m ago
Oh man... I like go because it is compiled, performant, strong and statically typed. But "fun" is not something I would say about it. The ergonomics of error handling, lack of ternary operator and other stuff that compiled 30yo languages already had ...
infinite_spin•1h ago
For me, whether it's AI or my own handcrafted artisanal code, the choice of language comes down to what has the least friction. This means I turn to vite/react for a lot of frontend requirements, and that the backend will be in nodejs or python, because those are easier for me to debug than writing an equivalent application in C++ or Rust.
xnx•1h ago
For the utilities I write it is faster to iterate without having to compile. When I get to the point where I'm done adding changing features, and performance is an annoyance I can always ask the AI to "rewrite this in Go". (I've never gotten to that point.)
rchowe•1h ago
Python has a much more mature ecosystem than Rust, especially for AI/ML stuff. I ran into a rust crate that purported to do a certain ML algorithm but did not do it correctly. I managed to write a replacement with Claude though.

I do think enforcing correctness at the type system level is a good idea for AI, which is why I often choose languages like C# and Rust over Python. However, for some things Python is definitely the correct tool for the job.

dev360•42m ago
Definitively something to be said for AI/ML library support. I find myself going with Rust / TS for a ton of my backend work lately though, even though I'm a huge Django fan for backend.
avereveard•1h ago
https://arxiv.org/pdf/2508.09101

tldr 2% average point lost on Rust compared to python, gap vary by model, go has a better upper bound but opus had it 3% below python.

benchmark is a bit old but research on why is there, article is just vibes

GardenLetter27•59m ago
The LLMs just churns out non-idiomatic slop in any language.

It doesn't matter if the 800-line if statement is able to use pattern matching.

There's been a lot of progress on making coding agents able to solve problems when they can easily evaluate in a closed loop, we desperately need something similar for controlling complexity and using relevant abstractions.

an0malous•59m ago
The ideal language for AI coding:

1. Type safety as basic guard rails that LLM output is syntactically and schematically correct

2. Concise since you have to review a lot more code

3. Easy to debug / good observability since you can't rely on your understanding of the code. Something functional where you can observe the state at any moment would be ideal.

4. A very large set of public code examples across various domains so there's enough training data for the LLM to be proficient in that language

5. A large open source ecosystem of libraries to write less code and avoid the tendency for generated code to bloat

It's basically all the same things you look for in general. I think TypeScript scores high here but I'm curious if anyone knows of a language that fits these criteria better.

ane•58m ago
Java?
sgt•49m ago
Was thinking the same. Modern Java is similar or at least quite a bit closer to many other less verbose languages. Not like your dad's Java anymore.
tptacek•57m ago
Type safety feels like the big one; anything you can shift to static/compile-time regimes benefits agents immensely.
pdimitar•56m ago
Golang. People trash it for being verbose on errors but it's an extremely readable language and it's almost like bash, only much stronger typed and with a very rich stdlib (so it's not likely you'll need a library for a quick script).

It's more or less a perfect replacement for Python for "one-off programs" and "quick scripts". Many bonus points for not having to fight shell quotation rules and trying to remember differences between sh, bash and zsh.

ASalazarMX•42m ago
In a world where AI supposedly can write in any language, Go is much better choice than TypeScript. Imagine contemplating for more than a few seconds a choice between simple, fast, cross-compilable language, and a TypeScript -> JavaScript -> Interpreter -> JIT stack.

If you don't know Go, it's more efficient to learn it than to waste the hardware resources of thousands to stay within JavaScript.

pdimitar•40m ago
Absolutely. And in this same thread I am noticing people offering Java (lol). Yeah, we all need 1.5s startup time for one-off scripts, surely.
OliverGilan•53m ago
I’d also argue it needs to compile fast/ have fast static analysis. Feedback loops like this are super helpful for agents
dukeyukey•53m ago
This is just Kotlin. Strongly typed, more concise than Java or Go (and probably Typescript), less likely to blow up at runtime than Typescript, epic tooling, plenty of public code, and a library for basically anything because JVM.
pdimitar•13m ago
And needs the JVM to start for 1.5s before you get any results. Sure.

Golang or just shell scripts.

MaxBarraclough•52m ago
> Concise since you have to review a lot more code

Isn't readability what matters here? Conciseness isn't the same thing.

fluffyspork•33m ago
C. At least with Gemma 4 it does a fine job. Writes good error checking. Writes memory management. Mostly straightforward and easy to read. A lot of libraries. Runs everywhere.
__mharrison__•57m ago
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 other languages as there are times when Python isn't appropriate)

dakiol•51m ago
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
QuadmasterXLII•49m ago
i have bad news
__mharrison__•39m ago
Lay it on. I love to collect other's anecdotes and see where they align (or disagree)
serf•48m ago
so it just boils down to strictness even when we're talking LLMs?

I agree with you about fast failure being a nice feature , but I also think that if you're TDDing a bunch of stuff and it fails in some categorical way , well then the test suite was lazy.

__mharrison__•40m ago
If you are using TDD with any recent model and even local models (qwen3.5+), you alleviate most of the issues mentioned.

Note that:

Writing code, then tests

Is not equivalent to:

Writing tests, then code

plqbfbv•2m ago
> so it just boils down to strictness even when we're talking LLMs?

The article describes what I've been doing for the past few months - I did small python projects in the past because of the ecosystem: I couldn't possibly write a ton of the stuff required for the things I wanted to do, so I leaned into python because someone already wrote it for me. Quality of deps was mostly ok for the happy paths, but always a chore to patch the broken ones.

Nowadays I tell Claude what I want to build and I always ask it whether rust is a good choice for it. It'll pick up the right crates or choose whether it should DIY, do all the plumbing, nail all the logic, and in ~30m I'll have something very solid that would have taken me 3+ weeks of part-time evening coding in python. I think the article is right and rust is the closest to the "best language" we have for LLM coding at the moment: the strict typing and the tooling dramatically reduce the output space for LLMs, and 99% of errors have a clear, precise explanation that is actionable, and the compiler helps you a lot there too.

I think it also boils down to the fact that you cannot reliably and quickly answer "why is this arg None?" in languages like python without figuring out the call graph and evaluating possible states and inputs/outputs. Rust makes all that explicit and forces you handle it, which I feel dramatically cuts the time an LLM needs to spend figuring out why it's broken or what to do next.

Strictness is a quality for software and a chore for humans, and of course the stricter you are at representing your logic and your state machine, the less ways a program can break. LLMs writing in rust give you the strictness without the chore part, and it's a very good deal from my point of view.

__mharrison__•42m ago
My anecdotal (sample size 1) experience is not consistent with this. I code fast. Refactor fast. My stuff doesn't break. But my methodology isn't the same as other's.
fxj•57m ago
You can of course use any language but here is my advice: you should use the language that you know best to make your life as uncomplicated as possible when you want to understand what the LLM was creating.

Remember, you are the judge whether the code is OK and if you use assembler you might get really performant code, but can you trust it?

Of course it might be a good incentive to learn rust or go. Or challenge yourself to learn something really cool like LISP, COBOL, FORTRAN, APL or J. (just kidding...)

just my 2 ct...

CivBase•55m ago
This point only makes sense if you ship AI code without reviewing it. And if you're shipping AI code without reviewing it, you're going to run into much bigger problems than Python performance limitations.
0xbadcafebee•53m ago
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. The big benefit of Go is the simpler language and "batteries included" standard library. This leads to fewer dependencies and less lines of code, which improves overall AI output. In theory, AI should be able to write better code faster in Go than in another language like Rust.

Python does have a much larger ecosystem of course, so with Go you have to develop from scratch what already exists in Python. But for smaller projects, you can also have an AI write a clean-room implementation in Go of some project in Python. So you aren't necessarily locked into one ecosystem anymore.

And in my experience, you don't even need to know the language. I have a co-worker who's basically not a programmer, but got multiple implementations of applications working sooner than our dev teams doing it by hand. You should be a coder so you can architect and orchestrate the coding, but 'language' isn't a barrier anymore.

serf•50m ago
1) python is one of the foremost trained upon languages

2) it's practically verbose, not technically

3) it resembles pseudocode

4) batteries included shortcuts a lot of work

all of these reasons are a boon for LLM work.

bad_username•47m ago
The article applies to a narrow case of a totally green field application that's going to be completely vibecoded. This is the only case where you reasonably can be indifferent to what the language is, and so you can abandon familiar Python and go with unfamiliar Rust. (If you _are_ familiar with Rust, the point of the article is moot.)

This "fair weather development" approach feels very risky if that application is going to be exposed to any serious usage. There WILL be a situation when things break and the AI will be powerless to fix it (quickly) without breaking something else in a vicious loop. There WILL be a situation where things work fine and tests pass with 3 concurrent users but grind to a complete halt with 1000 because there is something O(N^2) deep in the code. And you NEED a human to save your day (which requires also proper architecture for that to be possible in the first place). If you don't plan for this, and just hope for the best, then you are building nothing more than a toy. And if you plan for this, then it matters again what the language is, and whether your team is proficient in it.

Or maybe I too old fashioned or too behind the state of the AI art...

munro•47m ago
Lately I just have Claude build most things in Rust, it's really amazing. I tried Go, but I found it wasn't as good--Rust really does to me feel like Python. That said, it still struggles with the same class of errors of building complex systems. I've tried using TLA+, Alloy, and other things but haven't found the trick yet. The best I've found is reimplementing all external systems in memory and e2e testing everything extensively, without reimplementing the tests become unusably slow, and Claude can rewrite huge surface areas with ease--it's somewhere between mocking and literally just reimplementing the external systems.
skybrian•47m ago
This seems sort of like asking whether a chatbot should answer you in English or Japanese. Obviously, it should use whichever language you understand. If you understand Python best, why not write code in Python?

But on the other hand, maybe you could learn some other programming language, particularly with AI help. If that's what you wanted to do anyway, it seems like a good time to learn.

ActorNightly•46m ago
a) Python (and Node) comprise the largest training set for all the models, so you are likely to get way better accuracy, especially with local models

b) Python code is easier to introspect, and set up test harnesses around. And also extend in agentic frameworks

c) LLMs are really good at translation. I can give it python code and it can translate it into C.

aaroninsf•44m ago
As always, "it depends."

I'm using coding tools to build a complex media-intensive application. The approach I'm taking is to build a _reference implementation_ in Python, which is in its design specifics, constrained to use patterns which transliterate into the actual deployment targets (iPadOS/MacOS/Web).

Why start with Python?

Because I can read it, reason about it, and run it, trivially, which are Good Things for the reference. I intend to have multiple targets; I'd rather relate them to a source of ground truth I am fluent in.

For what I'm doing, there is also a very rich set of prior art and existing libraries for doing various esoteric things—my spidey sense is that I'm benefiting from that. More examples, more discourse.

I'm out of the prediction business and won't say this is either a good model for every new project, or, one I will need in another N months/years.

But for the moment it sure feels like a sweet spot.

Ask me again though, after the reference goes gold and I actually take up the transliteration though... :)

Terr_•44m ago
A somewhat contrarian/pessimistic view: The hardest thing in any future of LLM generated code is going to be the verification step, and especially types of verification that require humans which are going to be the most expensive.

Therefore the "best" language is going to be whatever makes it easiest for humans to detect bugs, bad design, or that the "wrong thing" has been developed.

ChicagoDave•40m ago
If you're using GenAI, you should go through the process of selecting an optimal tech stack for each solution, but also take into consideration that Claude and other services probably the most knowledge of python, javascript, and typescript with go, rust, java, and c# following closely behind. Consider what you're building and what elements of the tech stack is optimal for your problem-space.

I don't know rust at all and I've built three applications using it with Claude because it has speed and correctness built-in.

I use Typescript for 90% of the things I build. For web development I've used a number of tools, but mostly react, nextjs, or raw html/css/js. But if I were building an enterprise application I'd consider my team and whether opinionated (Angular) was optimal over flexible (React).

Each project should consider its own optimal tech stack.

999900000999•39m ago
So I can fix it when it breaks. I don’t understand anyone shipping real code without human review.

Give it 2 years, the ‘Blame the AI ‘ incidents will increase. Like an unfaithful partner you’ll always return to it

rick1290•22m ago
I'm still not sure. Would love thoguhts on this.. but in this new ai world we are in... is it better to go fullstack typescript? or go with proven mature frameworks? .net, ruby, django, etc? Seems TS is moving fast but maybe its time to not reach for the shiny object and stick with proven tech? or in 5 years will we regret it?
halfcat•3m ago
The main risk-of-regret is: How will you feel when/if the $20/month plan costs $2000/month?

May never happen. But be clear with yourself if you’re relying on it not happening.

It’s a hell of a nice risk mitigator to understand the code, in a language you know, if you have to print-debug it yourself at some point.

fxj•6m ago
One thing to consider:

The (well-known) Sapir–Whorf hypothesis (if dont know it, look it uop) is often invoked for natural languages, but there’s a pretty direct analogue for programming languages: the language you "think in" during solving a problem biases which abstractions and idioms you reach for first.

If you force an LLM to first solve a problem in a highly abstract language (Lisp, APL, Prolog) and only then later translate that solution to C++ or Rust, you’re effectively changing the intermediate representation the model works in. That IR has very different "affordance", e.g.

- Lisp pushes you toward recursive tree/list processing, higher‑order functions and macro‑like decomposition. (some nice web frameworks were initially written in LISP, scheme, etc...)

- APL pushes you toward whole‑array transforms, point‑free pipelines and exploiting data parallelism. (banks are still using it because of perforance)

- Prolog pushes you toward facts/rules, constraint satisfaction, and backtracking search. (it is a very high abstraction but might suit LLMs very well)

OK, and when you then translate that program into C++/Rust/python, a lot of this bias leaks through. You often end up with:

Rule engines, constraint solvers, or table‑driven dispatch code when the starting point was Prolog.

Iterator/functor pipelines and EDSL‑like combinators when the starting point was Lisp.

Data‑parallel kernels and "vectorized" loops when the starting point was APL.

In principle, an LLM could generate those idioms directly in C++/Rust. In practice, however, models are heavily shaped by their training distribution and default prompts. If you just say "write in Rust", they tend to regress towards the most common patterns in the corpus (framework‑heavy, imperative, not very aggressively functional or data‑parallel), even when the language would support richer abstractions.

By inserting a "thinking" step in a different paradigm, you bias the search over solution space before you ever get to Rust/C++. That doesn’t magically make the code better, but it does change which regions of the design space the model explores.

Same would also be true for python which is already a multi-idiomatic language. So it might be a good idea to learn a portfolio of different languages and then try to tackle a problem with a specific language instead of automatically using python/go/rust because of performance.

Something to consider...

p.s. how would a problem be solved when the LLM would have to write it first in erlang? Is it the automatically distributed?

p.p.s. the "design pattern" of the GoF comes automatically to my mind, which might be a good hint to the LLM to use.

TanStack NPM Packages Compromised

https://github.com/TanStack/router/issues/7383
165•varunsharma07•1h ago•39 comments

GitLab Announces Workforce Reduction and End of Their CREDIT Values

https://about.gitlab.com/blog/gitlab-act-2/
106•AnonGitLabEmpl•1h ago•52 comments

Google says criminal hackers used AI to find a major software flaw

https://www.nytimes.com/2026/05/11/us/politics/google-hackers-attack-ai.html
46•donohoe•8h ago•27 comments

Library for fast mapping of Java records to native memory

https://github.com/mamba-studio/TypedMemory
77•joe_mwangi•2h ago•21 comments

UCLA discovers first stroke rehabilitation drug to repair brain damage (2025)

https://stemcell.ucla.edu/news/ucla-discovers-first-stroke-rehabilitation-drug-repair-brain-damage
102•bookofjoe•4h ago•27 comments

I let AI build a tool to help me figure out what was waking me up at night

https://martin.sh/i-let-ai-build-a-tool-to-help-me-figure-out-what-was-waking-me-up-at-night/
34•showmypost•1h ago•30 comments

Can someone please explain whether Cloudflare blackmailed Canonical?

https://www.flyingpenguin.com/can-someone-please-explain-whether-cloudflare-blackmailed-canonical/
187•speckx•4h ago•107 comments

Nullsoft, 1997-2004 (2004)

https://slate.com/technology/2004/11/the-death-of-the-last-maverick-tech-company.html
193•downbad_•3d ago•62 comments

Ratty – A terminal emulator with inline 3D graphics

https://ratty-term.org/
579•orhunp_•12h ago•187 comments

The rise and fall of snake oil

https://www.historytoday.com/archive/history-matters/rise-and-fall-snake-oil
13•samizdis•4d ago•4 comments

Gmail registration now requires scanning a QR code and sending a text message

https://discuss.privacyguides.net/t/google-account-registration-now-requires-sending-an-sms-via-p...
508•negura•14h ago•352 comments

Show HN: OpenGravity – A zero-install, BYOK vanilla JS clone of Antigravity

https://github.com/ab-613/opengravity
18•ab613•1h ago•8 comments

Interfaze: A new model architecture built for high accuracy at scale

https://interfaze.ai/blog/interfaze-a-new-model-architecture-built-for-high-accuracy-at-scale
91•yoeven•5h ago•19 comments

Training an LLM in Swift, Part 1: Taking matrix mult from Gflop/s to Tflop/s

https://www.cocoawithlove.com/blog/matrix-multiplications-swift.html
196•zdw•1d ago•10 comments

Bild AI (YC W25) Is Hiring Founding Product Engineers

https://bild.ai/jobs
1•rooppal•4h ago

CUDA-oxide: Nvidia's official Rust to CUDA compiler

https://nvlabs.github.io/cuda-oxide/index.html
329•adamnemecek•6h ago•101 comments

Interaction Models

https://thinkingmachines.ai/blog/interaction-models/
28•smhx•1h ago•3 comments

Linux Terminal Memory Usage

https://gilesorr.com/blog/linux-terminal-memory-usage.html
24•speckx•2h ago•21 comments

From Buffon's Needle to Buffon's Noodle

https://mbmccoy.dev/posts/buffons-noodle/
20•_alternator_•4d ago•6 comments

AMÁLIA and the future of European Portuguese LLMs

https://duarteocarmo.com/blog/amalia-and-the-future-of-european-portuguese-llms
104•johnbarron•3d ago•52 comments

I hate soldering existentially

https://user8.bearblog.dev/rant/
20•James72689•3d ago•21 comments

Counting Fast in Erlang with:counters and:atomics

https://andrealeopardi.com/posts/erlang-counters-and-atomics/
56•malmz•2d ago•2 comments

The Boston library where you still can borrow a giant puppet

https://binj.news/2026/05/06/the-boston-library-where-you-still-can-borrow-a-giant-puppet/
36•gnabgib•2d ago•3 comments

Show HN: E2a – Open-source email gateway for AI agents

https://github.com/Mnexa-AI/e2a
7•mnexa•1h ago•0 comments

Venom and hot peppers offer a key to killing resistant bacteria

https://www.wired.com/story/mexican-science-transforms-scorpion-venom-and-habanero-chile-into-ant...
155•littlexsparkee•2d ago•67 comments

Building a web server in aarch64 assembly to give my life (a lack of) meaning

https://imtomt.github.io/ymawky/
84•theanonymousone•3d ago•29 comments

Software engineering may no longer be a lifetime career

https://www.seangoedecke.com/software-engineering-may-no-longer-be-a-lifetime-career/
301•movis•7h ago•514 comments

Red Hot Chili Peppers ink $300M deal with Warner Music to sell catalog

https://www.hollywoodreporter.com/music/music-industry-news/wmg-acquired-red-hot-chili-peppers-ca...
54•randycupertino•2h ago•50 comments

The greatest shot in television: James Burke had one chance to nail this scene (2024)

https://www.openculture.com/2024/10/the-greatest-shot-in-television.html
331•susam•19h ago•184 comments

Hardware Attestation as Monopoly Enabler

https://grapheneos.social/@GrapheneOS/116550899908879585
2057•ChuckMcM•1d ago•694 comments