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

Are arrays of arrays of different types allowed? #366

Closed
alexeyr opened this issue Nov 6, 2015 · 3 comments
Closed

Are arrays of arrays of different types allowed? #366

alexeyr opened this issue Nov 6, 2015 · 3 comments

Comments

@alexeyr
Copy link
Contributor

alexeyr commented Nov 6, 2015

Is [ [1, 2], ["a"] ] a legal value?

@alexeyr
Copy link
Contributor Author

alexeyr commented Nov 6, 2015

I see this is actually mentioned in #28, but the decision there depends on tuples. Currently the spec says

Arrays are square brackets with other primitives inside. Whitespace is ignored. Elements are separated by commas. Data types may not be mixed (though all string types should be considered the same type).

but it doesn't say that arrays of ints, arrays of strings, etc. are different types (and listing just "array" among other types creates the impression they aren't).

@skystrife
Copy link
Contributor

Yes; see the key arr5 in the array section of the README.

@alexeyr alexeyr closed this as completed Nov 6, 2015
@alexeyr
Copy link
Contributor Author

alexeyr commented Nov 6, 2015

Thank you.

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

2 participants