On 30 Oct 2013, at 14:06, Max Leske <maxleske@gmail.com> wrote:
To continue the discussion on this topic (stemming from issue 11635) Iâm starting a new thread. Please share your thoughts.
Form the other thread:
Personally I'm for more intention revealing selectors; I quite like #shuffled and #shuffleInPlace. If we can agree on a different naming scheme we should then apply it to other methods aswell of course (e.g. #sorted, #sortInPlace).
My proposition is to keep the selectors named #â¦d (#shuffled, #sorted, etc.), which operate on a copy, and rename the others (#shuffle, #sort, etcâ¦) to #â¦InPlace (#shuffleInPlace, #sortInPlace, etc.). The rational behind this is that (to my mind) the current scheme is not intention revealing (e.g. #shuffle vs. #shuffled). Which is especially problematic for newcomers.
Max
Hmm, I am not sure. If you follow this to its logical conclusion than a huge amount of methods would need an #InPlace suffix. I understand that you are trying so fix a possible confusion, but in the case of sorting the confusion is inherent: if you are lazy, a beginner, or just donât care about performance because the collections are small, getting a sorted copy back is the best solution; but if you care about performance and the collections a large, destructive sorting is a necessary option. Good comments in #sort and #sorted with cross references should help, that is why there are comments.