-
Notifications
You must be signed in to change notification settings - Fork 591
Open
Description
In short, we need a C function to copy one slot to another, not matter what it contains. The implementation in C is straightforward.
Why?
Because setters, that's why.
Setters should return their argument in order to keep Wren assignment semantics. See wren-lang/wren-cli#54 for a broader explanation.
Edit: To clarify, setters should return the assigned value, i.e. the value after transformations was applied. This does not matter most of the cases though.
Setters not always know their arguments. For foreign setters to be correctly implemented, we need now to switch the wrenGetSlotType() and use the appropriate method. Ugh. A wrenCopySlot() will be much better.
Metadata
Metadata
Assignees
Labels
No labels