|
|
|
|
|
by PaulDavisThe1st
414 days ago
|
|
The purpose of the first code example in TFA: > This is straightforward: we create a vector containing the values [1, 2], then iterate over it and print each element, and then finally print out the length of the vector. This is the kind of code people write every day. The C++ code I provided does essentially this (I omitted printing the length, since it is so trivial), and is "the kind of code people write every day". The fact that Rust requires you to consider move semantics for such simple code is precisely one of the central points of the article. |
|