The post focuses on Python, but I think it touches on an interesting question before skipping past it: ideally, what language would be best for our AIs to be programming in? The article says Rust. But can we do better? Rust has strong typing and memory guarantees which I think are important, but it’s also slower to compile. If we’re going to be doing agentic programming, where the agent is operating in a tight loop,…
Is Python Becoming Pinyin?
71–80 of 82 posts
Re: Is Python Becoming Pinyin?
#72The post focuses on Python, but I think it touches on an interesting question before skipping past it: ideally, what language would be best for our AIs to be programming in? The article says Rust. But can we do better? Rust has strong typing and memory guarantees which I think are important, but it’s also slower to compile. If we’re going to be doing agentic programming, where the agent is operating in a tight loop,…
It seems like the obvious point of tension is that you probably want AI to be constrained to/by some rigor. Rust is good because it enforces some safety measures, but I'm more interested yet in the work to have AI work with lean4 or the like to prove its code is up to spec. But that proof checking is probably in direct conflict with fast compilation.
Re: Is Python Becoming Pinyin?
#73Can't say I've tried Rust, but my AI tooling has always been noticeably worse at doing comparable tasks in C++ instead of Python. Not just toy examples but real systems in prod with testing, maintenance, oncall, feature rollouts, etc.
Re: Is Python Becoming Pinyin?
#74Earlier quoted context omitted.
This is a non-sequitur? Python is also not a "standalone language" and requires "some runtime".
Sure but that runtime is much more general purpose - JS runtimes are focused on network apps. For example you can write an app like Calibre in Python and QT and it is much lighter than writing something with JS and Electron. Python is easier to interface with C/C++ libs.
Re: Is Python Becoming Pinyin?
#75Earlier quoted context omitted.
Interesting -- I still think that Python is an easier onramp than TypeScript for new developers. But given the popularity and depth of JavaScript, and the clear advantages (and popularity) of TypeScript in serious development, that's not a bad prediction.
js is a web scripting language that can be strong-armed into running scripts through a runtime. Python is a general development language that can be used to build servers and web pages, but does a lot more besides. They're not really comparable. Having said that - I wouldn't be surprised if Python drifts towards stronger typing, although it will probably remain optional.
Re: Is Python Becoming Pinyin?
#76> Why ask AI to write its output in a dynamic language with relatively slow execution (i.e., Python)? So that it's easy for humans to review it. Same reason as ever. Obviously Python isn't always the correct choice, but the overlap with cases where vibe coding is the correct choice is pretty high. Also wtf is Pinyin?
Re: Is Python Becoming Pinyin?
#77These articles keep coming up, and the author never actually tries agentic coding in Rust vs Python. You will probably find that the LLM does better with Python for kinda similar reasons as humans. It's succinct and can be rerun quickly while you iterate. There's also the difference in training data. If/when a human needs to review code or intervene, same applies. Can't say I've tried Rust, but my AI tooling has alwa…
> Can't say I've tried Rust
...
Well, I've actually tried both. The result is similar to what happens when humans code: for small programs the simplicity and terseness of Python helps, but in large programs that accumulate many more invariants that have to be upheld, strictness of Rust becomes an advantage, because it can catch subtler issues with ownership, lifetimes, thread safety.
Although ownership and lifetimes seem like a Rust-specific chore, they're used in APIs to represent all kinds of temporary and single-use objects, so ownership errors are often symptoms of logic bugs that would exist in C++ and even Python, like an event handler callback assuming the event will fire only once when it can fire n times.
You don't see as much improvement with C++, because C++ requires the programmer to get these things correctly, instead of correcting the programmer.
Re: Is Python Becoming Pinyin?
#78Earlier quoted context omitted.
Pinyin is widely used, but pinyin’s primacy is oversold. Chinese texts start with teaching Chinese characters - many are recognizable to children from daily exposure to begin with, so they don’t need the pinyin. Pinyin only comes in when the character is genuinely unknown.
I think computer/smartphone usage has been changing that latent space for quite some time. People have been talking about "character amnesia" since 2010.
Re: Is Python Becoming Pinyin?
#79These articles keep coming up, and the author never actually tries agentic coding in Rust vs Python. You will probably find that the LLM does better with Python for kinda similar reasons as humans. It's succinct and can be rerun quickly while you iterate. There's also the difference in training data. If/when a human needs to review code or intervene, same applies. Can't say I've tried Rust, but my AI tooling has alwa…
> the author never actually tries agentic coding in Rust vs Python > Can't say I've tried Rust ... Well, I've actually tried both. The result is similar to what happens when humans code: for small programs the simplicity and terseness of Python helps, but in large programs that accumulate many more invariants that have to be upheld, strictness of Rust becomes an advantage, because it can catch subtler issues with own…
Re: Is Python Becoming Pinyin?
#80I still think learning to code, then learning engineering (i.e solving problems using rules of thumb) is crucial before any of agentic coding being sold these days. & lastly having taste - making sure you're not just accepting any library that the llm suggests