4 ms·
I've just started working with Rust, coming from a python/java/web background. Some of the constraints are a bit mind-bending, and the ecosystem is very immatur
by toyg 8y ago
I've just started working with Rust, coming from a python/java/web background. Some of the constraints are a bit mind-bending, and the ecosystem is very immature; but compared to C/C++, it's a dream.
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.
- steveklabnik 8y agoHave you checked out milksnake or pyo3?
- toyg 8y agoI'd seen milksnake and found it daunting. Pyo3 looks sweet. Thanks for the pointer!
- steveklabnik 8y agoNo problem!
- lmm 8y agoWhat 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?
- toyg 8y agoIt'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).
- twic 8y agoOne 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.
- lmm 8y agoYeah, 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.