3 ms·
Are there more people learning Rust than Python? I still felt like Python was sort of an ubiquitous language, a shared scripting language at the very least. I'
by baby 5y ago
Are there more people learning Rust than Python? I still felt like Python was sort of an ubiquitous language, a shared scripting language at the very least.
I'd say Python lacks a good out-of-the-box experience compared to Rust. You can't really use Python like Rust without figuring out how to install a project's dependencies, how to manage different versions of Python (which is even more of a nightmare if Python comes pre-installed with your OS), and Python's documentation kind-of-sucks in comparison to languages like Golang and Rust I find.
- dragonwriter 5y ago> You can't really use Python like Rust without figuring out how to install a project's dependencies, Because of how batteries-included Python is, you absolutely can, because you can use it quite a bit without any dependencies outside of stdlib. > Python's documentation kind-of-sucks in comparison to languages like Golang and Rust I find. I find Python's documentation to be far and away the best of any language I have encountered, and that definitely includes Go and Rust.
- baby 5y ago> Because of how batteries-included Python is, you absolutely can, because you can use it quite a bit without any dependencies outside of stdlib. I'm not talking about stdlib. If we're talking about stdlib then Golang is the gold standard :) I'm talking about using other projects. If they use a requirements.txt and pip maybe you'll have some luck, that is if you're using the same version of python/pip. > I find Python's documentation to be far and away the best of any language I have encountered, and that definitely includes Go and Rust. I'd say everyone should make their own opinion on the subject: * https://docs.python.org/3/library/string.html https://docs.python.org/3/library/string.html * https://pkg.go.dev/strings https://pkg.go.dev/strings * https://doc.rust-lang.org/stable/std/string/struct.String.html https://doc.rust-lang.org/stable/std/string/struct.String.ht... For having written a lot of these three languages, I find python's doc an ordeal to go through. But if you're comparing Python to C, C++, and other languages like that then sure it's great :D I mean look at Golang's. List of all the methods on the left, examples for each method.
- tialaramex 5y agoI definitely prefer Rust's documentation to Python's, but while string is a useful example because there's a lot to talk about, it's also a problem because e.g. that Rust documentation is for a type named String, while the Python and Go documentation is about libraries of string processing functions. So the fact Rust's String is specifically UTF-8 text is highlighted, because the documentation is about the type, presumably (modern) Python and Go also have UTF-8 strings, but that's not the context of the doc links so that's not what they're talking about. On the other hand, some features you might expect from a string type are (at first glance) missing from Rust's String, because they're implemented on str and so you get them for free because String is Deref<Target = str> This is also a problem looking at say, Java documentation, if you don't know that all the classes (but alas not the primitives) are sub-classes of Object then you've no reason to assume Object's methods work on them. Documentation has to be pitched correctly and if you're the wrong audience you will struggle to make use of it. Presumably expert C++ programmers have no problem with this sort of mess: https://en.cppreference.com/w/cpp/string/basic_string/find https://en.cppreference.com/w/cpp/string/basic_string/find