If AI writes your code, why use Python?

As large language models increasingly generate production code, developers are questioning whether languages like Python still make sense or if they should default to faster, strongly typed options such as Rust, Go, Java or C#. Many argue static typing, strict compilers and concise, well-structured code help AI agents self-correct and reduce runtime bugs, while others emphasize Python’s readability, vast ecosystem and dominance in AI/ML as reasons it remains practical—especially when humans must still review and maintain the output. Underneath the language debate is a broader shift: AI changes the cost trade-offs between performance, safety, tooling, and human comprehension, but does not remove the need for careful verification, testing and architectural thinking.

Medium and reading UX

  • Several commenters dislike Medium’s paywalls and intrusive UI, and recommend alternative frontends or extracting text into editors.
  • Others defend Medium as a durable, monetizable host with a built‑in audience, analogous to newspaper paywalls.

Why still use Python with AI?

  • Many say: use the language you know best, because you must still read, debug, and maintain AI‑generated code.
  • Python is praised for readability, “pseudocode‑like” style, fast iteration (no compile step), and a huge ML/data ecosystem.
  • Type hints plus tools (mypy/pyright/ruff/pydantic) are seen as important guardrails when using LLMs with Python.
  • Critics argue Python’s dynamic nature hides bugs until runtime and becomes hard to reason about in large systems.

Arguments for Rust, Go, and other typed languages

  • Strong static typing and strict compilers (Rust, C#, Java, Go, Haskell, OCaml, TypeScript, Elixir, Clojure, etc.) provide:
    • Better feedback loops for agents (compile‑time errors as “free tests”).
    • Smaller search space for LLMs, reducing slop and runtime failures.
    • Easier navigation of large, AI‑generated codebases.
  • Go is often highlighted as a “boring,” simple, fast‑compile, batteries‑included choice that LLMs handle well.
  • Some report excellent results with Rust+LLMs, claiming fewer bugs vs Python and that the borrow checker becomes “invisible” to them via the AI.

Training data, benchmarks, and language quality

  • One camp says: Python/JS dominate training corpora, so models work best there.
  • Others counter that consistency of code (e.g., Go, Perl) may matter more than volume; Python’s corpus may be noisy and stylistically fragmented.
  • Benchmarks cited (agentic coding evals, esoteric‑language studies) suggest:
    • Compiled, statically typed languages often outperform Python for agentic coding.
    • Models do poorly on tiny or esoteric languages, indicating reliance on training data rather than pure reasoning.

Human review, verification, and risk

  • Many insist shipping unreviewed AI code is reckless; verification (tests, type systems, linters, property‑based tests, formal methods) becomes the hard, expensive part.
  • Some advocate “vibe‑coding” prototypes in Python, then having AI port them to Rust/Go/etc. once requirements stabilize.
  • Others are experimenting with dual‑language setups (e.g., Python reference implementation + Rust/TS/Elixir production).

Broader reflections

  • Several predict dynamic languages will lose ground for production, but remain useful for quick scripts, notebooks, and ML.
  • A recurring theme: the “best” language in the AI era is the one that maximizes:
    • Static guarantees and compiler feedback for the agent.
    • Readability and debuggability for humans.
    • Library support for the problem domain.