Comment by petrzjunior

Comment by petrzjunior 4 hours ago

1 reply

I think the question is whether sort should return a new, sorted array or whether it should sort the array in place. In functional languages it is the former, in imperative the latter.

knome 3 hours ago

It can be quite useful to have nondestructive sorting in imperative languages as well. Hence python introducing 'sorted' even though '.sort()' preceded it.