3 ms·
In addition to what other people already said: > is this adding header and 'static together? Have you written any Java code? There is basically the same thing
by panzi 12y ago
In addition to what other people already said:
> is this adding header and 'static together?
Have you written any Java code? There is basically the same thing, except they use & instead of + to build unions of type bounds.
And about all the * and & stuff: That's pointer stuff. It is very similar to how it works in C/C++. I think it's just a bit simpler in Rust (you are required to use & to pass something by reference where in C++ you don't see at the call site if something is passed by value or by reference).
About Box: Terms like "auto boxing" are known from other languages (Java), so this is not a new terminology invented by Rust.
-> for defining the return type of a function is also not an invention of Rust. I don't know many functional languages but Haskell uses it, and C++11 uses it! So coming from C++ you should know that. ;)