The Stream interface currently has two methods, position() and index(). These are difficult to implement and must be nullable (if the stream isn't already being iterated). The API should be simplified: Both methods will be removed. You can track the current position yourself. The index will be the array key in the future.
The Stream interface currently has two methods,
position()andindex(). These are difficult to implement and must be nullable (if the stream isn't already being iterated). The API should be simplified: Both methods will be removed. You can track the current position yourself. The index will be the array key in the future.