A half-hour to learn Rust
fasterthanli.me
A half-hour to learn Rust
1–10 of 150 posts
Re: A half-hour to learn Rust
#2Re: A half-hour to learn Rust
#3Re: A half-hour to learn Rust
#4Re: A half-hour to learn Rust
#5> let x: i32 = 16i32;
Otherwise, it's a very comprehensive article. The only missing parts are the async/await keywords and the sync primitives (like Mutexes/RwLocks).
Re: A half-hour to learn Rust
#6Only, it’s more one hour and a half rather than half an hour. Excellent quality stuff nonetheless
Re: A half-hour to learn Rust
#7Numbers could also be differentiated in Rust. For example, to make sure your "16" is an i32 you could write > let x: i32 = 16i32; Otherwise, it's a very comprehensive article. The only missing parts are the async/await keywords and the sync primitives (like Mutexes/RwLocks).
Re: A half-hour to learn Rust
#8Numbers could also be differentiated in Rust. For example, to make sure your "16" is an i32 you could write > let x: i32 = 16i32; Otherwise, it's a very comprehensive article. The only missing parts are the async/await keywords and the sync primitives (like Mutexes/RwLocks).
You don't need both of those "i32"s. Rust has type inference, so you can just write either `let x = 16i32` or `let x: i32 = 16`.
> my_function( 44i32 );
That makes it clear from the code that function accepts an i32 and not any number.