{"action":"closed","number":4134,"pull_request":{"url":"https://api.github.com/repos/dlang/phobos/pulls/4134","id":64646070,"html_url":"https://github.com/dlang/phobos/pull/4134","diff_url":"https://github.com/dlang/phobos/pull/4134.diff","patch_url":"https://github.com/dlang/phobos/pull/4134.patch","issue_url":"https://api.github.com/repos/dlang/phobos/issues/4134","number":4134,"state":"closed","locked":false,"title":"Combine std.algorithm.isSorted and ordered to isOrderd{,Strictly}","user":{"login":"wilzbach","id":4370550,"avatar_url":"https://avatars.githubusercontent.com/u/4370550?v=3","gravatar_id":"","url":"https://api.github.com/users/wilzbach","html_url":"https://github.com/wilzbach","followers_url":"https://api.github.com/users/wilzbach/followers","following_url":"https://api.github.com/users/wilzbach/following{/other_user}","gists_url":"https://api.github.com/users/wilzbach/gists{/gist_id}","starred_url":"https://api.github.com/users/wilzbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilzbach/subscriptions","organizations_url":"https://api.github.com/users/wilzbach/orgs","repos_url":"https://api.github.com/users/wilzbach/repos","events_url":"https://api.github.com/users/wilzbach/events{/privacy}","received_events_url":"https://api.github.com/users/wilzbach/received_events","type":"User","site_admin":false},"body":"Hey I was wondering myself the entire time why we have separate methods for `isSorted`, `isStrictlyMonotonic`, `ordered`, `strictlyOrdered` - especially because the headers are clearly defined to be distinctive: `isSorted`/`isStrictlyMonotonic` uses just one argument whereas.`ordered`, `strictlyOrdered` uses two or more arguments.\r\n\r\n1) I think that having three different names `isSorted`, `isStrictlyMonotonic`, `ordered` for the same functionality is confusing (even @andralex - the author of `ordered` got confused himself)\r\n2) I added a new range trait `hasComparableElements` (it's set `private` for the time being) that checks whether we can compare the elements in the range\r\n3) In contrast to `isStrictlySorted` `isStrictlyOrdered` is [defined](http://mathworld.wolfram.com/StrictOrder.html) precisely\r\n4) I used `isOrdered` instead of `ordered` to stick with the usual naming scheme of boolean method in Phobos (e.g. `isPartitioned` in the same package)\r\n\r\nAs you can see in this PR this is pretty-straightforward.\r\n-> One _sorted_ to rule them rule them all!\r\n\r\nThis also contains the commit of #4110 as it already got approval and adds alias & deprecation warning for `isSorted`, `isStrictlyMonotonic`, `ordered`, `strictlyOrdered`.","created_at":"2016-03-30T15:22:43Z","updated_at":"2016-04-26T15:39:56Z","closed_at":"2016-04-26T15:39:56Z","merged_at":null,"merge_commit_sha":"31bc79117af623f6886e2411f14cb7f30c19c23f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dlang/phobos/pulls/4134/commits","review_comments_url":"https://api.github.com/repos/dlang/phobos/pulls/4134/comments","review_comment_url":"https://api.github.com/repos/dlang/phobos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dlang/phobos/issues/4134/comments","statuses_url":"https://api.github.com/repos/dlang/phobos/statuses/d1b488830e86425f79488f255de93cecb30bd0d9","head":{"label":"wilzbach:one_sorted_to_rule_them_all","ref":"one_sorted_to_rule_them_all","sha":"d1b488830e86425f79488f255de93cecb30bd0d9","user":{"login":"wilzbach","id":4370550,"avatar_url":"https://avatars.githubusercontent.com/u/4370550?v=3","gravatar_id":"","url":"https://api.github.com/users/wilzbach","html_url":"https://github.com/wilzbach","followers_url":"https://api.github.com/users/wilzbach/followers","following_url":"https://api.github.com/users/wilzbach/following{/other_user}","gists_url":"https://api.github.com/users/wilzbach/gists{/gist_id}","starred_url":"https://api.github.com/users/wilzbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilzbach/subscriptions","organizations_url":"https://api.github.com/users/wilzbach/orgs","repos_url":"https://api.github.com/users/wilzbach/repos","events_url":"https://api.github.com/users/wilzbach/events{/privacy}","received_events_url":"https://api.github.com/users/wilzbach/received_events","type":"User","site_admin":false},"repo":{"id":52009651,"name":"phobos","full_name":"wilzbach/phobos","owner":{"login":"wilzbach","id":4370550,"avatar_url":"https://avatars.githubusercontent.com/u/4370550?v=3","gravatar_id":"","url":"https://api.github.com/users/wilzbach","html_url":"https://github.com/wilzbach","followers_url":"https://api.github.com/users/wilzbach/followers","following_url":"https://api.github.com/users/wilzbach/following{/other_user}","gists_url":"https://api.github.com/users/wilzbach/gists{/gist_id}","starred_url":"https://api.github.com/users/wilzbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilzbach/subscriptions","organizations_url":"https://api.github.com/users/wilzbach/orgs","repos_url":"https://api.github.com/users/wilzbach/repos","events_url":"https://api.github.com/users/wilzbach/events{/privacy}","received_events_url":"https://api.github.com/users/wilzbach/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wilzbach/phobos","description":"The standard library of the D programming language","fork":true,"url":"https://api.github.com/repos/wilzbach/phobos","forks_url":"https://api.github.com/repos/wilzbach/phobos/forks","keys_url":"https://api.github.com/repos/wilzbach/phobos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wilzbach/phobos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wilzbach/phobos/teams","hooks_url":"https://api.github.com/repos/wilzbach/phobos/hooks","issue_events_url":"https://api.github.com/repos/wilzbach/phobos/issues/events{/number}","events_url":"https://api.github.com/repos/wilzbach/phobos/events","assignees_url":"https://api.github.com/repos/wilzbach/phobos/assignees{/user}","branches_url":"https://api.github.com/repos/wilzbach/phobos/branches{/branch}","tags_url":"https://api.github.com/repos/wilzbach/phobos/tags","blobs_url":"https://api.github.com/repos/wilzbach/phobos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wilzbach/phobos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wilzbach/phobos/git/refs{/sha}","trees_url":"https://api.github.com/repos/wilzbach/phobos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wilzbach/phobos/statuses/{sha}","languages_url":"https://api.github.com/repos/wilzbach/phobos/languages","stargazers_url":"https://api.github.com/repos/wilzbach/phobos/stargazers","contributors_url":"https://api.github.com/repos/wilzbach/phobos/contributors","subscribers_url":"https://api.github.com/repos/wilzbach/phobos/subscribers","subscription_url":"https://api.github.com/repos/wilzbach/phobos/subscription","commits_url":"https://api.github.com/repos/wilzbach/phobos/commits{/sha}","git_commits_url":"https://api.github.com/repos/wilzbach/phobos/git/commits{/sha}","comments_url":"https://api.github.com/repos/wilzbach/phobos/comments{/number}","issue_comment_url":"https://api.github.com/repos/wilzbach/phobos/issues/comments{/number}","contents_url":"https://api.github.com/repos/wilzbach/phobos/contents/{+path}","compare_url":"https://api.github.com/repos/wilzbach/phobos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wilzbach/phobos/merges","archive_url":"https://api.github.com/repos/wilzbach/phobos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wilzbach/phobos/downloads","issues_url":"https://api.github.com/repos/wilzbach/phobos/issues{/number}","pulls_url":"https://api.github.com/repos/wilzbach/phobos/pulls{/number}","milestones_url":"https://api.github.com/repos/wilzbach/phobos/milestones{/number}","notifications_url":"https://api.github.com/repos/wilzbach/phobos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wilzbach/phobos/labels{/name}","releases_url":"https://api.github.com/repos/wilzbach/phobos/releases{/id}","deployments_url":"https://api.github.com/repos/wilzbach/phobos/deployments","created_at":"2016-02-18T13:38:55Z","updated_at":"2016-03-08T13:03:37Z","pushed_at":"2016-04-26T15:20:27Z","git_url":"git://github.com/wilzbach/phobos.git","ssh_url":"git@github.com:wilzbach/phobos.git","clone_url":"https://github.com/wilzbach/phobos.git","svn_url":"https://github.com/wilzbach/phobos","homepage":"dlang.org/phobos","size":47588,"stargazers_count":1,"watchers_count":1,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"dlang:master","ref":"master","sha":"a1020244e941f4775f814deeabeed363725c2ad0","user":{"login":"dlang","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/dlang","html_url":"https://github.com/dlang","followers_url":"https://api.github.com/users/dlang/followers","following_url":"https://api.github.com/users/dlang/following{/other_user}","gists_url":"https://api.github.com/users/dlang/gists{/gist_id}","starred_url":"https://api.github.com/users/dlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlang/subscriptions","organizations_url":"https://api.github.com/users/dlang/orgs","repos_url":"https://api.github.com/users/dlang/repos","events_url":"https://api.github.com/users/dlang/events{/privacy}","received_events_url":"https://api.github.com/users/dlang/received_events","type":"Organization","site_admin":false},"repo":{"id":1257084,"name":"phobos","full_name":"dlang/phobos","owner":{"login":"dlang","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/dlang","html_url":"https://github.com/dlang","followers_url":"https://api.github.com/users/dlang/followers","following_url":"https://api.github.com/users/dlang/following{/other_user}","gists_url":"https://api.github.com/users/dlang/gists{/gist_id}","starred_url":"https://api.github.com/users/dlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlang/subscriptions","organizations_url":"https://api.github.com/users/dlang/orgs","repos_url":"https://api.github.com/users/dlang/repos","events_url":"https://api.github.com/users/dlang/events{/privacy}","received_events_url":"https://api.github.com/users/dlang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dlang/phobos","description":"The standard library of the D programming language","fork":false,"url":"https://api.github.com/repos/dlang/phobos","forks_url":"https://api.github.com/repos/dlang/phobos/forks","keys_url":"https://api.github.com/repos/dlang/phobos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dlang/phobos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dlang/phobos/teams","hooks_url":"https://api.github.com/repos/dlang/phobos/hooks","issue_events_url":"https://api.github.com/repos/dlang/phobos/issues/events{/number}","events_url":"https://api.github.com/repos/dlang/phobos/events","assignees_url":"https://api.github.com/repos/dlang/phobos/assignees{/user}","branches_url":"https://api.github.com/repos/dlang/phobos/branches{/branch}","tags_url":"https://api.github.com/repos/dlang/phobos/tags","blobs_url":"https://api.github.com/repos/dlang/phobos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dlang/phobos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dlang/phobos/git/refs{/sha}","trees_url":"https://api.github.com/repos/dlang/phobos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dlang/phobos/statuses/{sha}","languages_url":"https://api.github.com/repos/dlang/phobos/languages","stargazers_url":"https://api.github.com/repos/dlang/phobos/stargazers","contributors_url":"https://api.github.com/repos/dlang/phobos/contributors","subscribers_url":"https://api.github.com/repos/dlang/phobos/subscribers","subscription_url":"https://api.github.com/repos/dlang/phobos/subscription","commits_url":"https://api.github.com/repos/dlang/phobos/commits{/sha}","git_commits_url":"https://api.github.com/repos/dlang/phobos/git/commits{/sha}","comments_url":"https://api.github.com/repos/dlang/phobos/comments{/number}","issue_comment_url":"https://api.github.com/repos/dlang/phobos/issues/comments{/number}","contents_url":"https://api.github.com/repos/dlang/phobos/contents/{+path}","compare_url":"https://api.github.com/repos/dlang/phobos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dlang/phobos/merges","archive_url":"https://api.github.com/repos/dlang/phobos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dlang/phobos/downloads","issues_url":"https://api.github.com/repos/dlang/phobos/issues{/number}","pulls_url":"https://api.github.com/repos/dlang/phobos/pulls{/number}","milestones_url":"https://api.github.com/repos/dlang/phobos/milestones{/number}","notifications_url":"https://api.github.com/repos/dlang/phobos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dlang/phobos/labels{/name}","releases_url":"https://api.github.com/repos/dlang/phobos/releases{/id}","deployments_url":"https://api.github.com/repos/dlang/phobos/deployments","created_at":"2011-01-15T07:00:06Z","updated_at":"2016-04-26T13:41:40Z","pushed_at":"2016-04-26T15:20:27Z","git_url":"git://github.com/dlang/phobos.git","ssh_url":"git@github.com:dlang/phobos.git","clone_url":"https://github.com/dlang/phobos.git","svn_url":"https://github.com/dlang/phobos","homepage":"dlang.org/phobos","size":75402,"stargazers_count":703,"watchers_count":703,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":476,"mirror_url":null,"open_issues_count":87,"forks":476,"open_issues":87,"watchers":703,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dlang/phobos/pulls/4134"},"html":{"href":"https://github.com/dlang/phobos/pull/4134"},"issue":{"href":"https://api.github.com/repos/dlang/phobos/issues/4134"},"comments":{"href":"https://api.github.com/repos/dlang/phobos/issues/4134/comments"},"review_comments":{"href":"https://api.github.com/repos/dlang/phobos/pulls/4134/comments"},"review_comment":{"href":"https://api.github.com/repos/dlang/phobos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dlang/phobos/pulls/4134/commits"},"statuses":{"href":"https://api.github.com/repos/dlang/phobos/statuses/d1b488830e86425f79488f255de93cecb30bd0d9"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":4,"review_comments":6,"commits":1,"additions":133,"deletions":128,"changed_files":2}}