Wrapper Types in Rust: Choosing Your Guarantees
manishearth.github.io
manishearth.github.io
The difference is that Rust complains at compile time, deterministically. So Rust _feels_ like it's tripping you up, whereas you would have been tripped up (without realizing it, often, because runtime) in C++ too.
The second difference is that people are used to C++ and don't recall how complex it is.
If Rust wants to be useful it needs to have a lot of features devs expect from languages of that kind; plus all the features needed for memory safety; hence the complexity.
I'd like to know how much the author's proposed gc takes the friction away.
Without language support for a global-GC switch (which is never going to happen) I don't think a "simple" Java-esque GC would happen.
With language support there's still a decently simple GC possible IMO.
Without language support at all, some things (eg interior mutability) become unweildy if you want to have GCs in them, and we have to create new abstractions for it. It's not too bad though.
(The GC isn't finished and we haven't tried using it much so I really don't know how well it will turn out in practice)
====
regarding general cognitive overhead, it's not too much once you're used to it. And one needs to get used to any language they pick up anyway before using it seriously (just that the curves are different).
BTW, if you want a language where refcounting is the predominant approach (and where the compiler is built around it), but is otherwise very similar to Rust, you almost certainly want Swift.
https://www.fpcomplete.com/user/jfischoff/instances-and-dict...
[1] I guess close enough analog to Rust traits.
Traits are properties that types can have, like Java interfaces though more powerful.
Many traits can be used as types to form a vtable dispatch. For example, Box<Send> uses the trait `Send` here as a type. Objects of type `Send` are "unsized" and must be held behind a pointer (which becomes a fat pointer).
The GP asked about formal definitions. So I think they want something more precise than that.