Currently learning Rust (night one.) Will post updates in this thread. guess.trim().parse::<u32>().expect("please type a number").cmp(&secret) I'm going to enjoy this language.
-
Show this thread
-
Oh let me tag
@rustlang so someone gets a notification (not) for all this2 replies 0 retweets 1 likeShow this thread -
Why is the syntax for array indexing different from tuples? Maybe there are named tuples later, but still. Hmm.
3 replies 0 retweets 0 likesShow this thread -
Replying to @magi093
Arrays have all the same type, tuples have different types per element. So typechecking needs to know at compile time which element of a tuple you’re accessing
1 reply 0 retweets 8 likes -
Replying to @rustlang
Oh, and the a[index] syntax makes that impossible, got it. That makes sense!
2 replies 0 retweets 0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
