Top
Best
New

Posted by indigodaddy 2 days ago

If AI writes your code, why use Python?(medium.com)
897 points | 955 commentspage 19
aaroninsf 1 day 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... :)

t43562 1 day ago|
One can use a language as a sort of prototyping tool. I've once or twice done an implementation of some algorithm or idea in python and worked through all my conceptual errors and then done it again in C.

I think it was a hell of a lot easier than working through all that change in C first.

panny 1 day ago||
>fast compile

>rust

lol, thanks for the humor article of the day.

Terr_ 1 day 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.

BiraIgnacio 1 day ago||
I dislike Go but I have to admit, it's a great language for AI generated code. Simple enough, it compiles quickly and it performs meh-well enough for most applications.

One of the reasons I dislike Go is because it's easy for most engineers to write really low grade code with it. But AI agents would probably not write the best code in any language anyway, so not much is lost.

grougnax 1 day ago||
Rust is the way!
saltyoldman 1 day ago||
I migrated to Golang. I think it's a much better language to write TUIs, REST and interact with LLMs.
GardenLetter27 1 day 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.

pphysch 1 day ago||
The article gives zero examples of someone even attempting to transpile something from Python.

Numpy is two decades old. The lesson of "don't write everything in Python" is old news and LLMs just add a little momentum to that.

Glue languages will always exist and Python is the best at it.

docmars 1 day ago||
Simple answer: it's easily reviewable by a human, which will always be an important step in the process of building software, no matter how many hype conferences tell you to stop checking AI output irresponsibly.
More comments...