Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: