There's some good discussion on the Rust subreddit: https://www.reddit.com/r/rust/comments/53ft4m/my_experience_...
There's some good discussion on the Rust subreddit: https://www.reddit.com/r/rust/comments/53ft4m/my_experience_...
And alpine: http://pkgs.alpinelinux.org/packages?name=rust*&branch=&repo...
https://github.com/rust-lang/rust/issues/31322#issuecomment-... is the latest news on the subject. It's not impossible, but we're not sure _how_ we want to make it easy. The real issue is the bootstrapping, my understanding is that cross-compiling a musl compiler from a gnu compiler does work today, which is how those packages were made.
let mut guess = String::new();
io::stdin().read_line(&mut guess)
.expect("Failed to read line");
There are two things wrong here: 1) I have to use mutability to read from standard input. 2) I have to use a pointer. How about something like this instead: let guess = io::stdin().read_line()
.expect("Failed to read line");
Make it a macro or something if necessary. Personally, I just looked at this and decided that Rust wasn't ready for use by non-low-level programmers.> Personally, I just looked at this and decided that Rust wasn't ready for use by non-low-level programmers.
That's definitely a valid sentiment, but I think a better framing would be "isn't ready for use in non-low-level contexts": Rust is (and aims to become even better) an enabling technology that allows higher level programmers to more easily write performance sensitive code, because the aggressive compiler checks help people sidestep days/weeks of subtle pointer pain. Of course, the language focuses on this low-level/performance-sensitive space, and other languages may make more sense if those benefits aren't important for your particular use case.
Be careful, you're taking goals of other languages and layering them on Rust. It's entirely valid for a language to decide that the default idioms should not be sub optimal where that's easily achievable. In a language meant to compete with C/C++ on performance, defaulting to a slower idiom when security is not in question may not be the correct choice. In a language that is accepting some level of non-negligible performance loss in idiomatic code already (such as Go), the decision may be different.
That said, my conclusion after looking at Rust is that it's Haskell for compile-time memory management; i.e. it won't become very popular, but it'll influence languages that do.
My impression of Rust has always been that it's trying to supplant C++, by providing something with similar performance characteristics while being safer and with somewhat improved ergonomics (given the required complexity increase for the additional security, which may yield a net gain or loss in ergonomics depending on your point of view and background).
> it won't become very popular, but it'll influence languages that do
That's entirely possible, and I'm willing to accept that as a good thing if it happens. :)