Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support shorthand Array syntax #3

Open
aslilac opened this issue Nov 23, 2021 · 0 comments
Open

Support shorthand Array syntax #3

aslilac opened this issue Nov 23, 2021 · 0 comments

Comments

@aslilac
Copy link
Owner

aslilac commented Nov 23, 2021

i.e.

is([1,2,3,4,5], [$number])

[$number] here should be interpreted as $array($number)

Implementation attempts so far have shown that this is...tricky to get right. Also slightly concerned about confusion/conflict with single element tuples. Tuples with only one item are kind of pointless, and very uncommon, but I think we'd want to avoid ever adding a shorthand syntax for tuples in general, as [$number] meaning "Array of any length" along side something like [$number, $number] meaning "Array of exactly 2 length" would be confusing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant