If AI writes your code, why use Python?
691–700 of 1001 posts
Re: If AI writes your code, why use Python?
#692That was not on my bingo card!
A 10x speedup by switching to go is impressive.
(Why not rust? Linked to from the OP: https://thenewstack.io/microsoft-typescript-devs-explain-why...)
Re: If AI writes your code, why use Python?
#693The larger issue is actually correctness IME. Rust offers a better static-type story than Python, sure. But I would consider Haskell or OCaml to get even further gains.
Re: If AI writes your code, why use Python?
#694Earlier quoted context omitted.
The "other than that" is whitespace, not brackets. Whether that's a big deal is up to you, but the carry on effect of that is that the code is indented the way the control flow interprets it, so there are no bugs from misplaced braces. (Plenty of other bugs for other reasons, unfortunately.)
Whitespace forcing proper indentation practices has always been one of my favorite aspects of python. I TA'd a data structures in C++ class and the lack of proper indentation making code unreadable was my biggest pet peeve. I always made the student fix their indentation before I would help them debug it. I know that is mainly a beginner coding issue, but never having to deal with that issue was always one of the big…
Re: If AI writes your code, why use Python?
#695One obvious reason is Python's extreme readability, it has often been described as being as close to executable pseudo-code as one can get. If you're using an LLM to write code I think the rules would be 1. Use a language you know really well so you can read it easily, and add to it as needed. 2. Use a language that has a large training set so the LLM can be most efficient. 3. Use a language that is easy to read. If…
I never really understood what exactly is so readable about python. I've been developing in Python for 8 years now, and before that I was a C# developer, and I don't find Python to be that more readable. Sure there's less ceremony, and yes, you can have your project going with just a single file, but other than that...?
The scipy/numpy dataframes model is really neat though, python's has all the cool machine learning features, and since they're just a wrapper around some C++ and FORTRAN, it runs fast too if you do things properly.
Re: If AI writes your code, why use Python?
#696What is the point of having AI write code in, say, Rust if you have no clue about Rust and how to debug it?
Re: If AI writes your code, why use Python?
#697Earlier quoted context omitted.
I never really understood what exactly is so readable about python. I've been developing in Python for 8 years now, and before that I was a C# developer, and I don't find Python to be that more readable. Sure there's less ceremony, and yes, you can have your project going with just a single file, but other than that...?
Reaaaally? I think a lot of the readability of python is in the fact you don't need to be recently familiar with it to pick up what its doing most of the time. Over my career I've dipped in and out of rust, typescript, perl, swift, etc codebases. I'm no expert in any of these, but every single time I have to look something up to understand what this set of arcane symbols or syntax means. When I dip into Python I just…
_foo
foo_
__foo
_Foo__bar
__foo__
foo__bar
All of that is valid Python, and some of those forms mean different things depending on where they are used.
Re: If AI writes your code, why use Python?
#698The purpose of a scripting language was to make authoring easier, but now it’s mostly a middle layer. There’s still getting the investment of a great standard library to keep you on track, but if you pick parts to make modular wasm and which parts to use reliably, proven code you can find a good balance.
For qip I chose to use Golang as its standard library is batteries-included with fs & networking.
Then everything else is AI-coded wasm plugins.
Re: If AI writes your code, why use Python?
#699I thought it’s a poorly designed language with GC pauses so it surprised me that the ts compiler was written in it.
Re: If AI writes your code, why use Python?
#700Earlier quoted context omitted.
> AI makes Rust development go 10x faster. The borrow checker isn't even an issue. It's invisible now. What happens when things break and the AI agent can't fix it?
You'll learn Rust faster with AI and should be able to solve it yourself. You're unlikely to wind up in such a situation though. The design work Claude does in Rust is really sensible and idiomatic, and I really don't think you'll be unable to refactor or redesign things. Claude is extremely good with Rust generation, refactoring, and manipulation. I'll go as far as to say that AI has removed most of the complaints p…