4 ms·
Gotcha. I think with even a small amount of experience with the language, you'll find those things won't bother you anymore. I personally find the "varname: ty
by wtetzner 7y ago
Gotcha. I think with even a small amount of experience with the language, you'll find those things won't bother you anymore.
I personally find the "varname: type" syntax easier to read.
Also, keep in mind that Rust has type inference, so you can say things like "let foo = 37;", and the compiler will infer the type of "foo". The "varname: type" syntax is more compatible with optionally specified types, because it nicely fits in if you want to add the type info explicitly: "let foo: u64 = 37;".