Skip to content
This repository has been archived by the owner on Feb 3, 2020. It is now read-only.

References, Mutable References, Moves/Copies #48

Open
4 tasks
sunjay opened this issue Feb 26, 2017 · 0 comments
Open
4 tasks

References, Mutable References, Moves/Copies #48

sunjay opened this issue Feb 26, 2017 · 0 comments

Comments

@sunjay
Copy link
Owner

sunjay commented Feb 26, 2017

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 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant