Hacker News new | past | comments | ask | show | jobs | submit login

Python's little tin god really likes his CPython implementation being the One True Python. Python does the things that are easy to do in an interpreter where everything is a dictionary, and avoids things which are hard to do in that environment. In Python, you can store into any variable in any thread from any other thread. You can replace code being executed in another thread. Even Javascript doesn't let you do that. This functionality is very rarely used, and makes it really hard to optimize Python.

(And no, calling C whenever you need to go fast is not a solution. Calling C from Python is risky; you have to maintain all the invariants of the Python system, manually incrementing and decrementing reference counts, and be very careful about not assuming things don't change in the data structures you're looking at. This is not trivial.)

A generation ago, Pascal had the same problem. Wirth had an elegant recursive-descent compiler that didn't optimize. He insisted it be the One True Compiler, and managed to get the ISO standard for Pascal to reflect that. The decline of Pascal followed, although Turbo Pascal for DOS, a much more powerful dialect, had a good run, and Delphi still lives on.




> Python's little tin god really likes his CPython implementation being the One True Python.

No, he likes it to be the reference implementation, as it both is and should be. It's simple for a reason.

> This functionality is very rarely used

It's used all the time by debuggers, and the underlying features that allow you to do this is one of the most core and intrinsic things in Python.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: