Pre-PEP: Rust for CPython

I’ll start by saying my opinion doesn’t matter here: the number of lines of C I’ve written that’s in the Python interpreter is of the order of 10, so whatever you decide it’s unlikely to be my personal problem.

I’m pretty convinced of Rust as a nice language to write cool new things in (and of the value of exposing cool those cool new things to be used from Python). I’m less convinced of the benefit of rewriting existing working things in Rust.[1]

So from my point of view this PEP doesn’t offer a lot - it’s largely proposing “rewrite some modules in Rust with a view to soften people up to rewrite more in Rust”. I’d be much more convinced by a PEP that wanted to add something useful to the standard library and had found the best way to do that was to use a Rust library.


Minor comment:

I suspect this isn’t viable for a couple for reasons: PyPy isn’t hugely well maintained right now, and (I believe) PyPy needs a Python interpreter to bootstrap itself so may not solve the problem.


  1. And I think some of the push-pack Rust gets is from when people do this. It’s hard to argue with the benefit of a new and exciting feature but easy to be unimpressed with “what we already have but in Rust”. ↩︎

21 Likes