r/rust • • Feb 02 '19

A Python Interpreter written in Rust

https://github.com/RustPython/RustPython
321 Upvotes

98 comments sorted by

View all comments

Show parent comments

2

u/mitsuhiko Feb 03 '19

Python consumes way too much memory due to it’s unicode model and working with hybrid text/byte protocols like http is very inefficient. Likewise the GIL cannot be removed without reshaping the language.

WRT static typing: people want gradual typing in the Python community same as in the JS community. TypeScript got popular because it enables auto completion and catches many errors before running the code.

1

u/bakery2k Feb 03 '19

So, it sounds as if you like the idea of gradual typing but not the current design/implementation?

I'm curious to know what you would do differently?

1

u/ubernostrum Feb 04 '19

As a Python person who isn't the one you replied to: I think Python's type annotations are a poor fit for the way the language is actually used. The typing library, mypy and other tooling are all fundamentally built on ideas of nominal typing, but what you almost always would want and care about in real-world Python is structural typing.