Destructuring Assignment
- Dominant language
- JavaScript
- Stars
- 4.6k
- Forks
- 119
- PR merge metrics
- No merged PRs in 30d
Description
# Goal
Allow users to use [destructuring assignment](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/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;`
- [ ] Type annotations for destructured locals are not necessary
- [ ] Tests
Contributor guide
Research direction
The issue names no implementation files or tests. Start by locating the compiler's parser and existing assignment handling, then trace how locals are represented and inferred. Add coverage for array and object destructuring, including inferred local types, and verify the acceptance examples compile successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, wasm
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100