I do think the difficulty of Rust is brushed aside by its proponents. This week I wrote a little script to read an XML file, get a path from it, read a file at that location, do some regexes on it, and then update the XML and write it back to disk. I'd estimate it took me about 10 times longer to implement in Rust than Python. And I don't exactly know Python well - it wasn't just extra time Googling how to do things.…
You need to type your Python code extremely fast to finish it 10 times faster than this Rust program: extern crate xpath_reader; extern crate regex; use std::io::prelude::*; use std::fs::File; use xpath_reader::Reader; use regex::Regex; fn main() { let mut contents = String::new(); File::open("test.xml").expect("Unable to open the file").read_to_string(&mut contents).expect("Unable to read the file"); //println!("Fil…
It's not the typing that is slow - it's the constant "why can't I do it like this?" stackoverflow trips. For example - how do you open a file in read-write mode? Using File::open()? Nope!
Ok that one is just poor API design - most of the time was really in restructuring to make the borrow checker happy, and fiddling with adding and removing '&' and 'ref' to get the right types.