Top
Best
New

Posted by indigodaddy 17 hours ago

If AI writes your code, why use Python?(medium.com)
610 points | 638 commentspage 4
bozdemir 5 hours ago|
Yea I take the step a bit further, why bother Rust ? Just go write assembly or better the executable bytes... You see ? Readability is very important :)
twelvechairs 5 hours ago|
Surely its the same hierarchy as before. For most complex things you start with high level to get something running quickly then move towards low level when you bed down the spec and need more safety, error reporting, speed etc.
Decabytes 1 hour ago||
I legit have had this same thought. If we are going to be writing programs with AI, We should be programming in a more performant and explicit way, with statically typed programming languages that are able to encode the invariants in the program, even if it requires programming in a way that would be tedious for humans
b800h 6 hours ago||
If you're working with an agent to write code, you want it in the most quickly-readable format possible. That's generally Python, although YMMV. I want to be able to skim and zoom in on parts of code that might need attention. This makes it easy.

If the code were written in Java, I'd have more to read. If it were in JavaScript, I'd be slower following the calls (although the type system might catch issues more quickly - not a problem in my experience). I think Python is a good choice.

munksbeer 6 hours ago|
> If the code were written in Java, I'd have more to read.

That is not really the downside people think it is. Java is a remarkably easy language to read and understand.

harrouet 1 hour ago||
I am surprised that Python is being "threatened by AI writing code", as per the article, but that the said-article never wondered if the AI was more efficient writing in Python or what else.

I mean, the Python ecosystem is qualitative and generally well-documented. What if the AI spent 30% less tokens generating code than e.g. in Rust?

Or is there a kind of information theory where, given the same goals / tests, the AI will spent roughly the same in any language?

dragonelite 8 hours ago||
Kind of my fear is that the industry and dev community will ignore new frameworks, languages, architectures etc because the LLM aren't trained on those new things.

For example low level converging to Rust, web frontends to something like React etc.

JodieBenitez 7 hours ago|
Arguably, we've focused way too much on new frameworks, languages and architectures for a while.
redbell 5 hours ago||
> Andreas Kling, creator of the Ladybird browser and a career C++ engineer, ported Ladybird’s JavaScript engine from C++ to Rust in two weeks

Discussed here with 698 comments (https://news.ycombinator.com/item?id=47120899)

skybrian 16 hours 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.

meander_water 7 hours ago||
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 for a dependency is not working as expected, but frontier models automate that quite well.

adius 6 hours ago|
LLMs are now smart enough to simply download the code of any project they want to inspect. So this argument doesn't really hold up anymore …
meander_water 4 hours ago||
Sure, but will they download the right version? And will they be inspecting the right files on disk? There's a whole lot more that can go wrong
seebeen 2 hours ago||
Typescript with strict types and ultra-tight eslint config can give Rust a run for its money.
kylec 16 hours 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 16 hours ago|
Go is fun, you should actually learn it
xtracto 16 hours 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 ...
abalashov 11 hours ago||
That sort of syntactic sugar goes against the Go philosophy. Don't get me wrong, I share your frustration, but I also see the value of consistency in their philosophy.
WestCoader 9 hours ago||
I'm starting to think all these languages having their own pet "philosophies" that is "totally better than X" is a shitshow and just personal preference masquerading as standards.
abalashov 9 hours ago||
Go is less a language than a philosophy. It was an angry reaction to 10,000 ways to do things, and overly clever (ahem, expressive) syntactic sugar.

It is quite boring to write, but very easy to read.

Not a Go fanatic. I use Go and various other languages, and was a decade and a half late to the Go party anyway. Just trying to explain the outlook.

kylec 16 hours 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.
More comments...