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
+1 My somewhat naive view is that its better programming practice to
operate on a 'copy' to reduce side effects, and so are 'safer' and
generate less surprises, and so their use should be encouraged as the
first option - which comes from these having shorter method names
compared to the 'InPlace' ones.� In the cases that profiling reveals
'copying' to be too great a performance issue, then having 'InPlace' in
the method name is more intention revealing that there are side effects.