Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move expression is somewhat counter-intuitive #3

Open
mknyszek opened this issue Apr 22, 2017 · 0 comments
Open

Move expression is somewhat counter-intuitive #3

mknyszek opened this issue Apr 22, 2017 · 0 comments

Comments

@mknyszek
Copy link
Owner

Currently the move expression, specified by

var x = |3>;
var y = |2>;
x = `x >< `y // y gets set to Null

which take the value out of the local value, places a Null value there, and therefore allows each value to be consumed in a tensor product. However, this gets hairy if one has

var x = |3>;
{
  var y = x;
  var z = |3>;
  z = `y >< `z; // fails!
}

The semantics correspond to Rust's move semantics, but considering that QScript objects are reference-counted, it doesn't really make too much sense in the context of a scripting language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant