|
|
|
|
|
by itishappy
985 days ago
|
|
> What should it do? If I'm reading the article correctly, the user can be informed at runtime with little to no performance impact. That certainly sounds preferable to returning an unsorted list (that may not even match the input). Almost every Rust sort does this, but no C/C++ sorts do. That appears to support that author's conclusion that this is a cultural thing. |
|
It's not possible to verify a function is a strict weak ordering without enumerating the entire domain.