We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Jakt currently does not track mutability of types. Instead, it awkwardly conflates mutability of bindings with mutability of types.
We should split a type T into T and mut T. This would map to T const and T in the generated C++.
T
mut T
T const
let x = get_some<mut T>() should create an immutable binding to a mut T
let x = get_some<mut T>()
mut x = get_some<T>() should create a mutable binding to a T
mut x = get_some<T>()
Mutation method calls should only be allowed on mut T values, not T.
Passing a mut T to a function parameter of type T should be allowed.
There are probably other details that need figuring out.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Jakt currently does not track mutability of types. Instead, it awkwardly conflates mutability of bindings with mutability of types.
We should split a type
T
intoT
andmut T
. This would map toT const
andT
in the generated C++.let x = get_some<mut T>()
should create an immutable binding to amut T
mut x = get_some<T>()
should create a mutable binding to aT
Mutation method calls should only be allowed on
mut T
values, notT
.Passing a
mut T
to a function parameter of typeT
should be allowed.There are probably other details that need figuring out.
The text was updated successfully, but these errors were encountered: