This repository was archived by the owner on Mar 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Updated spec to handle sequential traversables better #46
Comments
+1 |
Nice |
|
ezzatron
added a commit
that referenced
this issue
Nov 12, 2015
ezzatron
added a commit
that referenced
this issue
Nov 12, 2015
ezzatron
added a commit
that referenced
this issue
Nov 12, 2015
ezzatron
added a commit
that referenced
this issue
Nov 12, 2015
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
There is currently no formal way to specify a sequential array, or iterator.
I've taken to using
array<integer,type>
since arrays with integer indices in PHP are typically sequential. But others have adoptedarray<type>
, even though this is actually equivalent toarray<mixed,type>
, which in no way restricts the indices.After discussions, the best solution seems to be to release a new version of the spec, where
array<type>
,mixed<type>
,ClassName<type>
etc. all indicate that indices will be sequential integers.array<mixed,type>
is still available for the rarer case where index type is flexible. Additionally, the other edge case of non-sequential integer indices can still be expressed witharray<integer,type>
.The text was updated successfully, but these errors were encountered: