Phooey. I had thought there was a consensus in favor of the sortedness thing. The patch, being mostly cut-and-paste, doesn't add all that much new code. Thanks for the advice about return convention The sorting_av flag appears to be part of the sort-in-place feature. On Tue, 2004-06-08 at 09:59, Nick Ing-Simmons wrote: > This looks like quite a big change for a return value which we seem > unable to reach consensus on. > (I would still like sort in scalar context to return min or max value > - don't care which because one can change cmp function to get the other.) > > What can one use your sortedness value for? I'm not too clear on that. Initial data analysis I suppose. Who was asking for the feature? Let's hear their justification for it. Archive search indicates that Merlyn said that is what should happen. http://groups.google.com/groups?selm=004501c42895%242d13d890%244722000a%40omarests2 > From: Randal L. Schwartz [mailto:email@example.com] > Jay> Understanding that, now I'm wondering why sort() returns undef in > Jay> scalar context. Shouldn't sort in scalar context return the > Jay> number of elements sorted? > > No. It's not documented that way. It returns undef now. Maybe > in a future Perl it will return "percentage sortedness" if there's > a fast way to calculate that. On Wed, 2004-06-09 at 05:23, firstname.lastname@example.org wrote: > Dave Mitchell <email@example.com> wrote: > : > :I thought that the concensus (such as it is) in a scalar context was that a > :concensus couldn't be reached on what it was supposed to return, and that > :therefore it should be left as is, with the warning? > > That's certainly the consensus that I have reached. -- david nicol "cat and buttered toast"