-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
small inconsistency in zero-arg array constructors #24777
Comments
We can probably lose |
But the problem with |
Found the discussion re. deprecating the zero-argument Relevant thought from #24778 (comment):
... and would better separate the zero-argument |
Investigating a bit further reveals that, in the |
The zero-argument constructor for
Vector
works with and without type specification:whereas the zero-argument
Array
constructor (which returns an uninitialized zero-dimensionalArray
) requires type specification:This inconsistency (naively) seems more or less harmless, and throwing a
MethodError
rather than returning something seems like a future-proof position. But this inconsistency initially surprised me, hence this issue. Thoughts?The text was updated successfully, but these errors were encountered: