Hacker News new | ask | show | jobs
by coder543 1863 days ago
Is the primary Python implementation self hosting? Ruby? JavaScript? PHP? Perl? It's common for compiled languages to be self hosted, but less common for scripting languages. (Not that Go is a scripting language, just pointing out that many popular languages aren't self hosting.)

Even beyond the question of self hosting, I would say that it's rare for much of a scripting language's standard library to be written in that language... especially performance critical parts of the standard library. There would just be too much performance left on the table.

The person you're responding to specifically mentioned they came from JavaScript, where the standard library implementations weren't written in JavaScript.

(PyPy is a notable exception to this rule of thumb... perhaps as part of its desire to prove how good the JIT is, it seems to be mostly written in Python, which is neat.)

2 comments

Yet decades old dynamically typed language like scheme and lisp are all self-hosted, even their own compilers. I can bet you that quite a few scheme implementations will beat python in performance.
Though that might be easier, given that for example Scheme is doing much less dynamic dispatch at runtime.
Fair point, I supposed I was thinking of compiled languages like Go.