Array patterns
- Dominant language
- No language data
- Stars
- 328
- Forks
- 71
- PR merge metrics
- No merged PRs in 30d
Description
This builds on proposal #124 like proposals #139 and #140 but for the array literal syntax:
```
Select Case arr
Case Match {} ' Empty.
Case Match {single} ' One element
Case Match {first, second} ' This could work.
Case Else ' Must have more than 2 elements.
End Select
```
**Would it work for arbitrary collections? IEnumerables?**
Unanswered.
**Would it be _very_ valuable to have a sort of "the rest" syntax**
I could imagine a syntax like:
```
Case Match {first, ...}
```
That captures the first element but allows for sizes greater than one but that seems of extremely marginal benefit for syntax compared with just grabbing the array and manually extracting values.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.