by keewee7 on 1/2/23, 8:59 PM with 100 comments
by wrs on 1/3/23, 12:23 AM
If you’re coming from C++ especially, where the move/copy situation is ridiculously confusing (IMO), but also from a simpler “reference by default” language like Java, this has profound impact on what’s intuitive in the language.
For the C++ comparison, this is a pretty good article: https://radekvit.medium.com/move-semantics-in-c-and-rust-the...
by attractivechaos on 1/2/23, 11:10 PM
by xiphias2 on 1/3/23, 1:27 AM
Any blog about learning Rust for beginners should just contain information that helps the reader decide _whether_ she should put in the time required for learning it, then refer to the great Rust Programming Language book that's really hard to surpass.
The reference is great as well, though personally I miss a part that formally defines the type system in its current form (there are some papers about lifetimes, but they are very hard to read).
by mlindner on 1/2/23, 10:12 PM
by deepsun on 1/3/23, 1:26 AM
> Closures (lambdas). Rust supports closures (also called Lambdas, arrow functions or anonymous functions in other languages).
That's misguiding.
Closures are not lambdas. Lambdas are just syntax, but the whole point about closures is that they capture the enclosing environment (have access to variables where it's defined). Rust's documentation states just that. Closures may or may not be lambdas.
In above example of "Inner functions" (which is also a closure) that would be more clearly explained if the inner function used an outside variable. Not all languages can do that.
by joaquincabezas on 1/2/23, 10:12 PM
I really hope to start using Rust in 2023, probably for some kind of API gateway experimentation
by solomatov on 1/3/23, 2:15 AM
by ridiculous_fish on 1/3/23, 12:45 AM
by ww520 on 1/3/23, 1:27 AM
by jason2323 on 1/3/23, 12:58 AM
by skor on 1/2/23, 11:28 PM
by tomr75 on 1/3/23, 2:07 AM