sort API design

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Fri Nov 22 00:11:09 UTC 2019


On Thursday, 21 November 2019 at 23:28:48 UTC, Jonathan M Davis 
wrote:
> So, I'm sorry that you gotten bitten by sort not working the 
> way you expected, but I don't see how that could have been 
> prevented without implementing the range in the way that you 
> expected, which would then screw over anyone who assumed that 
> the range would be sorted in-place.

This has come up several times before, here are two of them:

https://forum.dlang.org/search?q=Sorted+past+tense&search=Search

It can be fixed with careful naming conventions.

(lazy sorting make sense actually... Heap... Bucket...)



More information about the Digitalmars-d mailing list