Skip to content

Revert "Added support for splitting on ReadOnlySpan<char> (#295)"#37757

Merged
layomia merged 1 commit intodotnet:masterfrom
layomia:ros_split_revert
Jun 11, 2020
Merged

Revert "Added support for splitting on ReadOnlySpan<char> (#295)"#37757
layomia merged 1 commit intodotnet:masterfrom
layomia:ros_split_revert

Conversation

@layomia
Copy link
Contributor

@layomia layomia commented Jun 11, 2020

This reverts commit 78ed8e8.

We need to consider having the ReadOnlySpan<char>.Split() methods return a type other than the generic SpanSplitEnumerator. There are many pivots that string.Split has that we probaly want to align with, and baking all the required logic in the generic SpanSplitEnumerator<T> type will negatively impact performance and make the implementation for other types, e.g. SpanSplitEnumerator<byte> unnecessarily bloated. See #37742 (comment) for more detail.

We also want to avoid bugs being introduced if this implementation is used as a drop-in replacement for string.Split, due to behavioral differences:

Given this implementation and the highlighted takeaways, we'll be more informed when reviewing #934, and before settling on an implementation.

cc @bbartels

@layomia layomia added this to the 5.0 milestone Jun 11, 2020
@layomia layomia self-assigned this Jun 11, 2020
@davidfowl
Copy link
Member

@layomia layomia merged commit d00c5f6 into dotnet:master Jun 11, 2020
@layomia layomia deleted the ros_split_revert branch June 11, 2020 20:24
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants