What is it that you want from Python? Presumably automated memory management - but if you have GC pauses anywhere in your stack then you can presumably afford to have them everywhere in your stack. Would a language like OCaml (or my own favourite, Scala) give you everything you need: Rust-like safety but Python-like expressiveness?
It's just that the Python ecosystem is so much bigger, there are much more productive libraries for dealing with things that are not performance-critical. With python you get stuff like QT, nice configuration parsing (rust has one lib and pretty immature too) and so on, available with zero effort. Python is now so huge that only a handful of other communities has anything comparable (Java, PHP, JS and maybe Perl, basically; I would add C# but there you usually have to pay for stuff).
Yeah, availability of libraries is important. That's one thing Scala was quite clever about bootstrapping: there are native-Scala libraries for a lot of things these days, but if you need to do something rarer you can very easily call into a Java library.
One approach to this is to write a core program in Rust, and support it with a bunch of scripts in Python.
For example, i have a program that accepts data over the network, filters it according to some rules downloaded from a config server, and sends matching data somewhere. The packet handling, which needs to be fast and reliable, is in Rust; the downloading and parsing of the rules, which can be slow and just needs a sanity check at the end, is in Python.
Re:Rust Traits Deep Dive, Part 2
by steveklabnik on Wednesday June 20, 2018 @09:38AM
(#17355201)
Have you checked out milksnake or pyo3?
I'd seen milksnake and found it daunting. Pyo3 looks sweet. Thanks for the pointer!
Re:Rust Traits Deep Dive, Part 2
by steveklabnik on Wednesday June 20, 2018 @11:23AM
(#17356248)
No problem!
It only needs a few things to achieve world domination, imho: a good crossplatform GUI toolkit, and a trivial way to interface with higher-level languages like Python.