Top
Best
New

Posted by indigodaddy 19 hours ago

If AI writes your code, why use Python?(medium.com)
702 points | 721 commentspage 6
RagnarD 4 hours ago|
Really glad to see someone asking this question. After building a fairly significant AI tool using Python tools, I really wish AI/ML tools would all be rewritten to use an actually performant language - say, Rust - without transitive dependency hell on all the package versions.
mattstir 3 hours ago|
The vast majority of Python's AI/ML ecosystem is already written in C/C++ and uses interop glue to call it from Python. But agreed on the transitive dependencies, it's a nightmare
rick1290 18 hours 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?
stiiv 5 hours ago||
For building web applications or a system that includes logic that needs to run on the web? TypeScript is mature enough, and it's top tier for domain modeling. As long as you stay disciplined, Claude Code will write excellent TypeScript for you, and you can run it pretty much anywhere.

The only reasons to hesitate, imo, are (A) you're worried that it won't perform as well as you need on your servers, or (B) you're scared of npm supply chain attacks.

halfcat 17 hours 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.

dizhn 7 hours ago||
In my experience Python is fine. However both Go and Flutter(Rust) are better due to the tools that are available, especially the compilers. Flutter in particular surprises me with how good LLMs are at it. Both might actually be thanks to good documentation. Maybe that they are not VERY fragmented and don't have a lot of baggage.

Frontend CSS/HTML is pretty bad though. Although they can work, it takes a lot of pushing. It's probably normal since they do not actually have eyes yet.

repiret 10 hours ago||
My experience is that there's a correlation between powerful type systems and the property that once your program compiles, it's correct. Compiles == correct is rarely true in C or JavaScript. It's often true in Haskell and Rust. TypeScript is somewhere in between C and Rust.

There's a niche available for a language which is relatively easy for a human to read, but with a very powerful at the expense of difficult to use type system. The language would let you make all sorts of assertions whose meaning are easy for the human to see, but to compile would need to come along with correctness proofs. The language is meant to be written by AI, which can battle the compiler, and write the proofs, but then read by humans who can verify that the AI wrote the program they wanted and/or direct the AI to make changes.

munksbeer 7 hours ago|
>My experience is that there's a correlation between powerful type systems and the property that once your program compiles, it's correct. Compiles == correct is rarely true in C or JavaScript. It's often true in Haskell and Rust.

I find this staggeringly hard to believe. Most bugs are logic errors. How does Rust or Haskell prevent these?

yakshaving_jgt 5 hours ago||
> Most bugs are logic errors.

Are they? IME most bugs are type errors.

Or rather, IME most bugs are logic errors only because I've excluded the possibility of type errors by using a sophisticated type system.

munksbeer 1 hour ago||
Most of my bugs are logic errors. I write Java. Your comment seems to imply that moving to Rust or Haskell would make a correct program if it compiles.
yakshaving_jgt 1 hour ago||
I don't think porting your program to Haskell would make your program correct.

I think porting your program to Haskell would make all of your bugs logic errors, rather than only most of them.

asdff 14 hours ago||
Better question is why use any code? Generate random functions and select based on measuring the distribution of output of these functions against metrics of interest. A pure black box of instruction that is more performant than any verbose code or algorithm we could come up with, because all we select for is performance above all. Directed evolution essentially of the codebase, generated through mutation and selection, just like everything else on planet earth.
abalashov 13 hours ago||
I laughed hard!
stevefan1999 11 hours ago||
Really controversial but my honest opinion: That's because programming languages, and its natural language counterpart, too, are nowadays increasing and more likely in becoming a political tool, rather than itself being a tech tool.

I observed this through observation of the attacks to Rust due to the huge presence of LGBT people.

Now while I'm pretty much straight myself, I don't reject LGBT people and don't want to partake in identity politics.

I just want things that works no matter what background you have, yet there are some people attacking Rust because of its inclusiveness nature.

And just like Linux is being perceived as nerdy and geeky and "gaming socks ready", the tokenization of things, and there attaching political meanings to it, are quickly coming to everything, so perhaps I'm too general here as well.

Let's say it is not political, but definitely adding more meanings to its technical origin and nature

jiriknesl 4 hours ago||
Most of the attacks on Rust, I have seen, have nothing in common what people are implementing Rust.

It has a lot in common with the fact Rust is very low level language, a direct C++ competitor, and many people use it for apps that could be easily implemented in much higher languages and run fast enough.

A driver or kernel extension in Rust? No problem. A todolist SaaS startup with no users? It's better to use Rails, Django, or Laravel for that.

Mashimo 9 hours ago|||
> I observed this through observation of the attacks to Rust due to the huge presence of LGBT people.

Never seen that before, but then again I'm not in the rust community.

> don't want to partake in identity politics.

If you write Rust, or let AI write rust, do you have to partake in the identity politics?

The internet is full of memes and jokes on how shitty Java and Java Script. Yet it came never up at work. Never stopped me from writing java.

Just like Emacs vs Vim, I'm just using Nano. Never had any discussion IRL. And at work everyone uses Idea.

It's hard for me to see writing Rust somehow gets you into partaking in identity politics. Did that actually happen to you, or something that you are afraid of?

Ygg2 8 hours ago||
> Never seen that before, but then again I'm not in the rust community.

As a straight guy, number of times people attacked Rust for catering to "that crowd", "DEI-language", and "woke mind-virus" has been pretty huge on Xitter.

Which is always hilarious to me, since language itself doesn't have anything offensive.

> If you write Rust, or let AI write rust, do you have to partake in the identity politics?

Answer is of course no. However by choosing to write it you'll be perceived as anti-Zig, anti-C, pro-woke, etc.

Mashimo 8 hours ago||
Fascinating.

> However by choosing to write it you'll be perceived as anti-Zig, anti-C, pro-woke, etc.

I don't even know what zig or C is. (Please don't tell me) Edit: Oh, C the language. From context I thought it was short for something on the anti-woke site :)

But who is checking what language you are vibe coding at? And does it matter to you that those people perceive you as anti-zig?

There is probably someone on Xitter who thinks me not using VIM is just plane wrong, but that has no influence on me. To be completely honest, this all sounds like a non-issue.

I mean there is also an anti-ai crowed (r/antiai) but who cares what people on the internet think?

thefounder 11 hours ago||
Why we have discussions about sexual orientation on programming languages? Could this really go any worse?
stevefan1999 10 hours ago||
I won't say it is just because of sexual orientation, but more because of the identity politics associated with it.

Not just like "what kind of gender people I like" this kind of oversimplification but it's more about your attitude towards gender stereotypes and roles, for that's what I saw in a more deep connotation.

munro 18 hours 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.
schmookeeg 18 hours 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 :)
thefounder 11 hours ago||
So he includes Go in a list of languages that apparently makes development slow and have “a build system that fought you” and then says python was the solution for all that. I think he got it backwards. I have found the Python build system horrific and broken by default while Go just works.
caturopath 7 hours ago|
Other correctly point out it does matter what language the code is in since the human does sometimes need to read and understand it.

But also, I suspect the article is just wrong. "The hard languages got easy first" isn't true in practice and the impressive examples given are not representative or as magical as the poster makes them out to be.

The takeaway might be right in the end, but the post isn't right in the beginning.

More comments...