Currently code-generation for most AST nodes supports both copy and move assignments, however, structs only have one assign keyword to which an assignment is bound. The signature is (*T, *T) -> (), (where the first argument is the destination and the second is the source). This means that we either need to find a way to make the signatures different or we need to separate out copy/move assignment via keyword.
Two of many options:
move_assign and copy_assign keywords.
Use (*T, T) -> () as the signature for moves.
I don't currently have strong opinions on this.
Once we make a decision, there are some type-checking and code-generation changes needed.
Type verification for uncopyable/immovable types.
Structs need to distinguish between these two kinds of assignment
Currently code-generation for most AST nodes supports both copy and move assignments, however, structs only have one
assign
keyword to which an assignment is bound. The signature is(*T, *T) -> ()
, (where the first argument is the destination and the second is the source). This means that we either need to find a way to make the signatures different or we need to separate out copy/move assignment via keyword.Two of many options:
move_assign
andcopy_assign
keywords.(*T, T) -> ()
as the signature for moves.I don't currently have strong opinions on this.
Once we make a decision, there are some type-checking and code-generation changes needed.