3 ms·
If you know that a crate exists then you can simply `cargo add foo` and have it download in the background while you get on with writing your script. If you don
by nicoburns 6y ago
If you know that a crate exists then you can simply `cargo add foo` and have it download in the background while you get on with writing your script. If you don't know that it exists then you'll have to find it the first time, but you have that problem with python standard library modules too.
Writing scripts with Rust likely will be slower than Python, but I don't really buy that having functionality in crates is part of that.
- papaf 6y agoIf you don't know that it exists then you'll have to find it the first time, but you have that problem with python standard library modules too. Except that, if its in the standard library, you don't have to choose between multiple implementations. I have written scripts faster than I have chosen dependencies.
- deleted 6y ago[deleted]
- nicoburns 6y agoIf I want to make an HTTP request in Python, which module should I use? There is a built in one (more than one I believe), but the official docs link out to a 3rd party module https://docs.python.org/3/library/http.client.html https://docs.python.org/3/library/http.client.html
- papaf 6y agoI think things are beginning to get a bit surreal. People arguing that Rust is a better scripting language than Python and now with one particular poor example in the Python standard library means the chaos of crates.io is a comparable solution in terms of reducing choice. Rust is a great C++ alternative. But seriously, the community has cult like marketing.
- nicoburns 6y agoFWIW, I agree with you that Python is better that Rust for scripting (I was not the OP), but finding a crate in Rust is generally a matter of googling "Rust http client" or "Rust regex" and reading the top result. Not exactly hard, and in my experience something that I end up doing in every single language including Python, because using the standard library directly is often not the correct choice.
- swsieber 6y agoAnd there's the Rust cookbook. I view the cookbook as sort of a recommended extended std.
- bluejekyll 6y ago> But seriously, the community has cult like marketing. What in your opinion makes one language cult-like vs. another that many people like and recommend to others? Cults generally have a very negative impact on those who are members vs. the leaders. Usually the members of cults are taken advantage of and are only there to support the people at the top. The Rust community is very far from anything cult-like.
- zepto 6y agoCults are usually bad for the leaders too.
- hannofcart 6y agoYeah, am a Rust beginner but very proficient in Python, and despite having being warned of Rust community's zealotry, I haven't found interacting with them anything but pleasant. The documentation is great. Various channels to interact with the community have always been polite and helpful. Heck, one would think that the author of a leading book on the language popping up everywhere to give helpful answers/clarifications would be seen as welcome and not in-your-face-activism.
- pixel_fcker 6y ago