Issue 5618 - Fix separator schizophrenia
Summary: Fix separator schizophrenia
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P4 enhancement
Assignee: No Owner
URL:
Keywords: bootcamp
Depends on:
Blocks:
 
Reported: 2011-02-19 22:16 UTC by Jonathan M Davis
Modified: 2024-12-01 16:14 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Jonathan M Davis 2011-02-19 22:16:46 UTC
Some functions in Phobos take an element for a separator whereas others take a range. For instance, splitter takes an element, but its opposite - joiner - takes a range. findSplit* take a range and split on that (though they don't technically take a seperator per se) but until takes an element. I keep having to look up functions to know whether the separator they take is a single element or a range of them.

I would think that it would behoove us to make the functions in Phobos which take separators _consistent_ and make them all take a range for their separator rather than having some take a range and some take a single element. It would definitely improve useability. And if it's a problem to have them all take a range for their separator, then maybe they should have two versions - one which takes an element for the separator and one which takes a range.
Comment 1 bearophile_hugs 2011-02-20 03:53:25 UTC
See also bug 4468
Comment 2 dlangBugzillaToGithub 2024-12-01 16:14:00 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/phobos/issues/9899

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB