logoalt Hacker News

rchoweyesterday at 9:16 PM5 repliesview on HN

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.


Replies

sshineyesterday at 10:32 PM

I almost always pick Rust. Recently I wrote a plugin for something that was written in Go. I could have used Rust, but Go for one felt right because if the thing turned out well, others would surely find more value in having one toolchain.

The main reason is that you’re capable of reading it if you need to. And the recipient ecosystem expects a language. That’s why some data science communities pick R, MatLab, Julia, Python or Mojo not depending on what’s superior tech, but what their peers speak.

show 2 replies
mountainrivertoday at 2:17 AM

I think the only use cases are when it wraps low level C++ libs like ML libraries, and yes those are extremely difficult to reproduce

dev360yesterday at 9:36 PM

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.

parpfishtoday at 12:51 AM

i think the enforcing the type system is good with AI for a couple reasons: - (speculating) typed language have faster/better LSPs that can be used to more efficiently modify code with tool use. - when a human DOES need to step in and start investigating/modifying the code, the strong typing makes it much easier to get oriented within their spaghetticode

bsderyesterday at 11:55 PM

Yeah, I mean, if I'm going to step away from the Python ecosystem and let AI manage/polyfill my dependencies, I might as well shift the whole way to OCaml/F# rather than Rust.

Then I get the benefits of GC and strong typing.