brain
brain copied to clipboard
References, Mutable References, Moves/Copies
Reference: &Foo
Mutable reference: &mut Foo
Move/Copy: Foo
The data should be moved if type does not implement Copy, copy otherwise.
- [ ] Fix all variables are mutable references #67
- [ ] Consider making variables immutable by default and add a
mut
keyword- This may not constitute a major semver change depending on the breaking impact
- [ ] Static analysis should prevent using a value after it has been moved
- Could start by not supporting moves if the static analysis isn't mature enough yet (this would mean non-copy types would always have to be passed by reference--not bad)
- [ ] Automatic referencing/dereferencing