Live data from Hacker News

If AI writes your code, why use Python?

medium.com

951–960 of 1001 posts

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

#951

Earlier quoted context omitted.

I think Clojure would probably make for a more interesting comparison because its syntax is more different from the other languages currently on there and it's less multi-paradigm than Scala is (it doesn't support OOP, it's more explicitly immutable-first). I think Scala is a lovely and cool language, but I'd be more interested in the Clojure comparison here. Prolog night be interesting because I bet nobody is trying…

> it doesn't support OOP That is only accurate if OOP means "inheritance-based class hierarchies with mutable state" - which is one narrow definition of it. Clojure has solid OOP support, just not in the class-hierarchy-first sense.

In this context, what I mean is "Clojure seems like a more interesting example because inheritance-based class hierarchies with mutable state are a footgun and it lacks them; I wonder if that will help LLMs be any more effective in the language." :)

But I am curious about your favorite OOP-y tools in Clojure. I know it has flexible dispatch, it has a notion of agents that are a bit like objects in how they encapsulate state... but it's been a long time since I really used Clojure and I don't have a clear picture of what the best OOP-y idioms in Clojure look like or what makes them good to use.

Care to explain a bit more?

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

#952
post #759

Earlier quoted context omitted.

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

They're complementary. AI reviewers are bad at spotting inappropriate architecture patterns and unnecessary verbosity, but they're very good at identifying various types of complex logic bugs and detecting mismatches between code docs and implementation. They add substantial value.

That's fair

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

#953

Earlier quoted context omitted.

Python is locally readable. Reasoning about larger systems in Python is where things get really hard, because you have to describe how many small individually readable things interact with each other in a very limited vocabulary.

I’m curious about the design space of languages & frameworks which are lower level than LLM prompts but higher level than Python, Ruby and Common Lisp. Do you have any recommendations for systems where reasoning about large systems is easier than in python?

Anything with a good, static type system will be an improvement, in my opinion. Types exist to encode invariants in an enforceable way, after all.

Rust is the gold standard among imperative languages, but it’s standard fare among functional languages such as Haskell, OCaml, F#. You can also get really far in C++ if you have the stomach for it.

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

#954
post #267

Earlier quoted context omitted.

Huh. This surprises me. Digging, it seems it looks like it comes down to interpreted + dynamically typed vs compiled and statically typed. TIL. If i were to start a truly vibe project; Go would have a significant leg up.

and yet dynamically typed elixir wipes the floor with go. https://github.com/Tencent-Hunyuan/AutoCodeBenchmark/blob/ma...

This doesn't say what you think it does.

Language like elixir were given easier problems to solve when compared to other languages.

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

#955
post #232

Earlier quoted context omitted.

1. Amount of Rust training data isn’t as much as Go. 2. Golang syntax and style is very verbose yet simple. There’s not as many options nor programming language to domain mapping needed as in Rust. Leads to needing less sophisticated LLM to spit out Golang than Rust successfully and efficiently.

This must really depend on your niche. I assume you do web stuff or something? Good luck finding any golang examples in a lot of other fields. Rust, on the other hand, is taking over the world in systems programming.

Just reporting what I’ve experienced. No need to go with the ad hominem attack. I happen to lead a team with a major Rust infra project and I stand by the experience with usage across all the LLM models.

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

#956
It seems clear that AI can port libraries at will to any other language. So even if we disagree on which language should win, the best libraries will be ported regardless.

Each has their benefits:

Python wins in AI and syntax niceties. Loses on perf and library migration. uv (written in rust) saved the whole ecosystem from dying in my opinion.

Typescript wins because web integration, much better type system, ok perf, and gigantic npm ecosystem. Also loses on library migration and perf and large container sizes.

Go wins on compile speed, perf, standard library l, module system, and go fmt + never breaking compatibility being a massive LLM advantage. Main con is not being rust :)

Rust wins on perf, safety, syntax, wasm / sandboxing. think worse on module system and compile speed vs Go.

Java/Kotlan/C# are in enterprise land and probably the runtime approach is flawed for the ai eras.

C++ is strangely relevant because choosing c++ is easier than before. I tried writing a shared library in rust and then trivially converted it to c++ when I wanted

Zig is up and coming but also has an unknown future. Seems like a great language, but if bun switches to rust it might be set back a bit.

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

#957
post #488

Earlier quoted context omitted.

The reason why Java is such a terrible choice now is not technical, it's the Lawnmower Nazi argument: https://news.ycombinator.com/item?id=15886728 masklinn on Dec 9, 2017 | parent | context | favorite | on: Larry Ellison allegedly tried to have a professor ... And remember, > Do not fall into the trap of anthropomorphising Larry Ellison. You need to think of Larry Ellison the way you think of a lawnmower. You don't…

Sure, I don't like Oracle either but Java has moved beyond that years ago. There's a thriving community that does not rely on Oracle.

A thriving community of sharecroppers.

Now they have riding lawnmowers for their jack booted thugs, who buy media companies with the promise of firing journalists who hurt Trump's feelings.

Kinda of puts a harsh Java Supremacist edge on Sun's old "100% Pure Java" ideology.

Larry Ellison Promised to Fire CNN Anchors If Trump Approved Takeover

https://www.yahoo.com/news/articles/larry-ellison-promised-f...

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

#958

Earlier quoted context omitted.

> it doesn't support OOP That is only accurate if OOP means "inheritance-based class hierarchies with mutable state" - which is one narrow definition of it. Clojure has solid OOP support, just not in the class-hierarchy-first sense.

In this context, what I mean is "Clojure seems like a more interesting example because inheritance-based class hierarchies with mutable state are a footgun and it lacks them; I wonder if that will help LLMs be any more effective in the language." :) But I am curious about your favorite OOP-y tools in Clojure. I know it has flexible dispatch, it has a notion of agents that are a bit like objects in how they encapsulat…

Clojure is opinionated about state and identity, not about paradigm in general. It will accommodate whatever paradigms as long as you respect its model of how state gets managed. But try to smuggle some pervasive mutability and you'll feel resistance. Immutability and explicit state management are non-negotiable defaults, and most paradigms fit comfortably within that constraint. Clojure bends well toward:

- Functional (its primary identity)

- Data-oriented (how you model your domain)/data-driven(how you control behaivor)

- Polymorphic/interface-driven (protocols, multimethods)

- Logic-style (via core.logic) - mostly unused

- Reactive/event-driven/actor-like concurrency (core.async, manifold)

- There's another paradigm vector (Spec/Malli), but it frankly has the gap in the terminology landscape. It's neither Dependent Typing, nor Gradual; not quite Contract-based Design; not Refinement Types (typically a static concept); calling it Schema Validation really undersells it - implies just input checking. It does something genuinely novel in combination. There isn't a single established term to capture all of that.

Where the language resists:

- Classical OOP with mutable stateful objects - you can do it via Java interop or careful use of atoms+records, but the language actively nudges you away. It won't feel natural and you'll be fighting the grain.

- Imperative/procedural style - possible, but again, why?

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

#959

Earlier quoted context omitted.

I think my problem is that I’m not sure I understand whether you evals are testing language abilities or reasoning abilities. It seems to present results as if they’re testing language abilities, but the problems seem to be reasoning problems.

I'm not so sure there's a difference. The main thing we want to measure for LLMs is broad reasoning capability, but seeing how that ability changes under different constraints (like programming language) is the interesting part.

Ok, when you put it that way, I agree that this is in fact interesting. Maybe you should actually put that sentence in some kind of form on your website because it clarifies a lot.

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

#960

Earlier quoted context omitted.

> Having used Python on and off for 20 years, my experience with LLMs writing Python has been mixed. I don’t think that’s necessarily because of a low-quality dataset, but rather because Python’s applications are so broad and the language has gone through several paradigm shifts over time If there’s one language that is the prime example of this, it’s C++, and according to this benchmark it ranks incredibly high. I’m…

The more filters you apply (single model and single language, especially if you also filter by pipeline like agentic vs one-shot), the fewer samples, so there is variance. Known limitation that is inevitable with any finite budget. This is why we are selective about adding more languages because it will dilute the amount of samples we can run per language per model. But the aggregated statistics hold up well and are…

I just applied a single filter, programming language.
Post reply on HN