Earlier quoted context omitted.
Haskell would be my vote, and Rust too, actually, both because of their very strong type systems. The type system lets you very quickly figure out what something is before you figure out what something does , and it turns out that separating those two concerns as hard as those two languages do often results in doing the whole one-two punch faster.
Bit of a nit, it isn't the strong typing that makes Rust great for LLMs, it's the very strict compiler. Plenty of languages have strong (enough) typing but their compilers happily let you or the LLM footgun yourself.
If AI writes your code, why use Python?
891–900 of 1001 posts
Re: If AI writes your code, why use Python?
#892Earlier quoted context omitted.
the trend is AI also does the code review. Too many anecdotes and studies showing AI is a better code review that a human and the models are just going to get better. Whether we get better results if AI reviews Python or Rust I'm not sure. But I suspect Rust will win out as the training data likely has more content around Rust correctness and language usage than Python does.
You must have a low bar for human code review. I've seen that in practice too. But I've also been on teams that took code review very seriously, and frontier AI really doesn't come close to a good human code reviewer imo
Re: If AI writes your code, why use Python?
#893But under this frame, it appears that the developer's task involves prompt engineering. This is not the case. Even if an agent generates 90% of the code, each and every diff is going to be in my review queue. Code readability of Python isn't an advantage during write; it's an advantage while reviewing. As an agent generates a piece of code, I will have to read the code, comprehend the code, and determine whether it d…
except this will go away. we will likely reach a point sooner rather than later (I think 2027) where it will be infeasible for humans to review the code. This will happen at startups first rather than big corps obviously and the engineers who design systems (dark factories) fully leaning into this will have a huge advantage. And yes there are exceptions to this and a play on the other side but the this is where the b…
Re: If AI writes your code, why use Python?
#894Earlier quoted context omitted.
That was the hardest part of learning PHP, all the code examples online were just awful.
Worked on a PHP project once. Every time I asked why something was done a certain way the answer was "dunno, we copy pasted this code snippet." Certain popular PHP codebases appear to use a similar methodology.
So much copy/pasted code, some of it REALLY bad, and PHP has a lot of foot-guns that can lead to RCE.
Re: If AI writes your code, why use Python?
#895Re: If AI writes your code, why use Python?
#896As always, "it depends." I'm using coding tools to build a complex media-intensive application. The approach I'm taking is to build a _reference implementation_ in Python, which is in its design specifics, constrained to use patterns which transliterate into the actual deployment targets (iPadOS/MacOS/Web). Why start with Python? Because I can read it, reason about it, and run it, trivially, which are Good Things for…
I think it was a hell of a lot easier than working through all that change in C first.
Re: If AI writes your code, why use Python?
#897Earlier quoted context omitted.
But what is the selling point for Go? I get that it is allegedly hailed to be a simple language with basically no batteries included, but why is that a selling point? Does Go excel at anything no other language does?
Go has a very full featured standard library. It's simple (do you really ask why that's a selling point?) It's fast to compile. It's fast to run. It's good with parallelism. It has myriads of examples, and LLMs can pick it up well too. It has good backing. It has good tooling. It's fun. It statically compiles to a trivially deployable binary. It's excellent at cross compiling. It has good adoption.
if err != nil
It's amazing how they managed to design a new language with all the flaws of '90s languages.Re: If AI writes your code, why use Python?
#898Re: If AI writes your code, why use Python?
#899Re: If AI writes your code, why use Python?
#900Earlier quoted context omitted.
Surprisingly, LLMs are actually much worse at reasoning in Python than other common programming languages for agentic coding tasks. Data here: https://gertlabs.com/rankings?mode=agentic_coding
Cool to see my hunch be backed by data. Python is a scripting language with OOP bolted on. Means there’s not really a styling consistency that other languages have, with things tending to look like PHP, a collection of various scripts that invoke one another
There are teams of people who don't come from an engineering background who do utilize Python as a series of scripts with some extra sugar. Just because you can do that doesn't mean that you should.