Christophe: > > What is "unuseful and confusing" about: > > > > max!"a.length"(range); ? > > What is confusing is that I don't know if this function returns a > length, or one of the elements of the range.
In Python the max and min work this way, and the students I have taught Python don't see this as a problem. On the opposite, they are thankful for this feature. > It seems > (to me) more natural to give it a predicate to compare elements two at a > time. This is what is used in c++ std lib. It's less natural. And D is not C++, there are more than just C++ programmers in D. And it leads to longer & more complex code. > "less" predicates are very > common in a std lib, so they should not surprise the user much. In the standard library there is also a decorate-sort-undecorate sort too. Bye, bearophile
