First taste of Rust
pudgepacket.github.io
pudgepacket.github.io
I'm in no way criticizing the OP, I just wonder why these sorts of articles are especially valuable.
Personally, I tend to read:
* lobste.rs (like HN, but more tech and less startup BS)
* /r/haskell
* Lambda the Ultimate
At all three of these sites I am regularly confronted with material I do not easily understand, so I lurk and take in what I can.
—
I know your question isn't specific to this submission, but Rust is a new language, built to support an ongoing research project. Very few people, if any, could have written a large complicated system (apart from Servo).
Even if an expert were to write an article explaining how they use Rust, it would be of little use to most people using Rust at this point in time.
Example: Nobody was explaining how to use JavaScript for large complicated systems in 1998: the language itself wasn't ready for this kind of usage, and adoption hadn't reached the critical mass required for certain discoveries (language quirks, unexpected ways to do things, ready to use libraries and frameworks etc.) to be made.
[0]: Substitute Rust for any new language.
let first_character = match line.chars().next() {
Some( v ) => v,
None => return
}
match first_character {
'# => println!("Comment"),
...
} match line.chars().next() {
Some(x) => match x {
'#' => ...
'v' => ...
_ => ...
},
None => ...
}
But I felt that the current approach was fine. At this point it becomes more a decision of style and taste vs any kind of practicality.But Rust doesn't have pure functions.
That being said I'm not sure why the author mentioned that point in particular. Maybe he feels that having immutable-by-default semantics encourages writing pure functions?