Live data from Hacker News

If AI writes your code, why use Python?

medium.com

801–810 of 1001 posts

Re: If AI writes your code, why use Python?

#801

Earlier quoted context omitted.

If static has won, why are dynamic languages more popular now (even since 2023). Comically, I’ve witnessed people say this since the 90s. For me, I don’t care about static because dynamic is easier. For the very few conditions where it matters, I’ll use static. Otherwise I like the simplicity of dynamic languages, especially python. IDEs provide support and jump to definitions in dynamic languages, too.

I think most people agree with you -- that's why. Also because I'd say most programmers don't care much about maintainability or quality. I personally find that AI writes better Scala than Python.

Before AI, I used to say types reduce quality by wasting dev time that could've been spent on testing. They may also encourage overly complex code.

With AI, I don't know. If we're forced to use types, the AI does that work for me, but that added verbosity can't be good for it.

Re: If AI writes your code, why use Python?

#802

But 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…

> Code readability of Python isn't an advantage during write; it's an advantage while reviewing. This is completely subjective though. I personally find that Python's lack of static types makes code very difficult to reason about. Yes, some devs will write decent comments and name things in a way that's easier to read, but most devs are lazy (myself included) and things get out of hand quickly. But this is also a sub…

When you have types, you end up having to look up what every type means anyway because the names are meaningless.

Re: If AI writes your code, why use Python?

#803

Earlier quoted context omitted.

> The reading experience is abhorrent Nothing you read in the browser can provide ultimately great and hands-down the best reading experience equally for everybody - the modern web model is inherently at odds with that. A plain HTML page with no CSS is a near-perfect reading experience. The problem is that almost nobody ships that, because the web also became a publishing platform where authors compete for attention.…

> Why would I do that, if I can easily extract all the relevant, plain text (and even structured one) and read it in my editor instead? Because that’s an enormous pain in the ass. Not scalable at all.

Its pretty easy with a system like Readwise. Yes, that's ANOTHER system, but its one system to quickly just add articles like these to an inbox and read them another time, in plain text.

Of course, it doesn't work 100% and certain sites are hostile to it and do stupid javascript tricks "for the views".

Mostly, I use it to put it on a reading list later, and to get around really, really abusive ad driven sites.

Re: If AI writes your code, why use Python?

#804
post #787

Earlier quoted context omitted.

> Code readability of Python isn't an advantage during write; it's an advantage while reviewing. This is completely subjective though. I personally find that Python's lack of static types makes code very difficult to reason about. Yes, some devs will write decent comments and name things in a way that's easier to read, but most devs are lazy (myself included) and things get out of hand quickly. But this is also a sub…

Python has type annotations now [1] that type checkers, IDEs, etc. can use. [1] https://docs.python.org/3/library/typing.htmlhttps://docs.py...

For sure, and if I'd ever need to use Python I'd want to strictly enforce that across my team (pre-commit hooks or whatever).

Re: If AI writes your code, why use Python?

#805
post #794

The static vs dynamic language debate is decisively over and static has won. I called this out back in 2023, and I've only become more convinced since then. Statically typed languages are easier for the reader because you can see the types and quickly jump to their definitions (or even just hover over them in some IDEs). They're easier for the AI because they provide natural guardrails and feedback to guide it, as we…

> The static vs dynamic language debate is decisively over and static has won I wouldn't be so fast. It wasn't that long ago that the dynamic zealots were declaring victory. And before that the static zealots. And before that the dynamic zealots. Going back decades.

I was there, I was one of the dynamic zealots.

But at least I can't imagine how this trend reverses course now.

Re: If AI writes your code, why use Python?

#806
I definitely prefer typescript to python. But typescript doesn't have a pytorch equivalent..

Also AI doesn't write code in all langs / frameworks equally. For many cases, it will almost always fail first attempt at producing working syntax in various frameworks. Unless you document those cases and mitigate via an AGENT doc instruction or something you will have to churn at least one extra turn on all those cases.

Re: If AI writes your code, why use Python?

#807
post #794

Earlier quoted context omitted.

> The static vs dynamic language debate is decisively over and static has won I wouldn't be so fast. It wasn't that long ago that the dynamic zealots were declaring victory. And before that the static zealots. And before that the dynamic zealots. Going back decades.

I was there, I was one of the dynamic zealots. But at least I can't imagine how this trend reverses course now.

> I can't imagine how this trend reverses course now.

That's exactly what those/you dynamic zealots were telling people like me 15 years ago :-)

But yes, I largely agree with you. My $0.02 is that the larger pendulum over the decades is a trend towards static but being less and less visible to the end user, increasing the static typing while reducing the boilerplate and overhead on the part of the developer. Think things like type inference and the sort. Even as a static typing fan I don't miss the days when literally every variable needed an explicit type annotation.

Re: If AI writes your code, why use Python?

#809
I've moved much of my vibe-coded projects from Python to Rust. That lets me vibe code an Android port as well - only the UI needs porting.

If the app has a desktop GUI, that's still in Python with Qt. Maturin creates Python packages from Rust. It's terrific.

https://github.com/pyo3/maturin

Re: If AI writes your code, why use Python?

#810

The static vs dynamic language debate is decisively over and static has won. I called this out back in 2023, and I've only become more convinced since then. Statically typed languages are easier for the reader because you can see the types and quickly jump to their definitions (or even just hover over them in some IDEs). They're easier for the AI because they provide natural guardrails and feedback to guide it, as we…

I find it does not do very well with go at all. I speculate that it's partly because go is going to be a language you find a lot of concurrent programming happening in. And sure enough, I find even the best claude is nearly useless at anything beyond copy-pasting examples out of the docs for goroutines. My own experience with agents, I'd summarize as "the more the world model (which the LLM does not have) is not conc…

my experience with elixir is that if you tell the LLM "let it crash" it is productive. If you don't tell it this it hides errors and writes crappy tests. So, maybe it is go and not concurrency programming.
Post reply on HN