You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Destructuring assignment is pretty helpful and should be implemented. Destructured variables should become locals. Destructured variables should not need type annotation as they can be inferred, so that is super useful.
Acceptance Criteria
const [x, y] = arrayObject;
const {x, y} = vectorObject;
Type annotations for destructured locals are not necessary
Tests
The text was updated successfully, but these errors were encountered:
WASM "is" a stack machine, right? Does that mean you can in theory return multiple values by leaving multiple values on the stack, like in Forth and other concatenative languages? Is something like (type (func (param i32) (result i32 i32))) legal WASM?
Asking out of curiosity of how returning multiple values might be implemented in Walt (not directly applicable to destructuring, but potentially a way of doing "strength reduction" if an optimising pass is ever introduced?)
Goal
Allow users to use destructuring assignment.
Overview
Destructuring assignment is pretty helpful and should be implemented. Destructured variables should become locals. Destructured variables should not need type annotation as they can be inferred, so that is super useful.
Acceptance Criteria
const [x, y] = arrayObject;
const {x, y} = vectorObject;
The text was updated successfully, but these errors were encountered: