5 ms·
> if the reader is familiar with other C-like languages I like to think that Rust wants you to be familiar with C and ML syntax and philosophies before getting
by killercup 12y ago
> if the reader is familiar with other C-like languages
I like to think that Rust wants you to be familiar with C and ML syntax and philosophies before getting comfortable :)
The array type syntax you quoted is a bit like Haskell's `[Char]` syntax with a fixed-length property bolted on. You are right, though, that semicolon looks a bit weird. I guess using commas was not an option because the same syntax on the right hand side of the `=` means `[0, 0]`, i.e. two elements which are 0.