49
you are viewing a single comment's thread
view the rest of the comments

That paper was written a few years after Python was released, and before 2.0 was a thing. The article says it's already being used that way in industry, and reasons why vs just doing native code from the start (faster dev time and whatnot). The way module loading and the whole standard library works facilitates native extension.

His stated goals for Python were generally:

  • clean code for the interpreter
  • clean syntax to make intent clear
  • easy to learn and use

They go so far as to reject changes that significantly increase performance if it complicates the code. Why? The simplest explanation is that if you need the speed, building your own native extension is the way to go. That was the way I've been told to use Python: write in Python, and if it's not fast enough, rewrite the slow parts in C/C++.

LuaJIT is an example of the opposite approach, where the interpreter is designed to be fast enough that you generally don't need to use native extensions, and they prioritize performance over features, unlike Python. As a result, community contributions are very limited, and many people stick with the official runtime.

Python wouldn't be very successful without native extensions, so I think it's absolutely fair to say it was an early design decision.

this post was submitted on 14 Aug 2025
49 points (96.2% liked)

Python

7383 readers
1 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 2 years ago
MODERATORS