std.algorithm.sorting.ordered, strictlyOrdered

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 25 11:56:07 PDT 2015


On 6/25/15 6:31 AM, Vladimir Panteleev wrote:
> On Tuesday, 23 June 2015 at 22:45:10 UTC, Vladimir Panteleev wrote:
>> http://dump.thecybershadow.net/0362443dfcca30860db907e494831b79/names.diff
>>
>
> Rationale:
>
> - The function is very closely related to "isSorted".
> - The "is" prefix strongly indicates that the return value is a bool,
> and removes ambiguity that this function might return an ordered view of
> something.
> - Would be nice to leave this naming scheme for lazy range operations,
> as is already used for indexed / transposed, which return ranges, not
> bools.
>
> Suggested new name: isOrdered / isStrictlyOrdered

Is that the function that just takes a few values? isOrdered(0, x, 100) 
is a bit grating seeing as the grammar requires "are ordered". -- Andrei



More information about the Digitalmars-d mailing list