Why does sort return undef in scalar context ?

R

Rainer Weikusat

Ilya Zakharevich said:
Of course not. Just replace 90% of YOUR pages of instructions by two lines

h2xs OPTIONS

and

perl Makefile.PL && make test

I'm somewhat tempted to post the output generated by trying to execute
these two commands as they stand there :->. And I can even shorten
this somewhat: Instead of giving a complete set of instructions how to
reproduce what I had been doing, (hopefully) including enough detail
information to enable someone who read them to understand what
precisely was supposed to be going on there and why it was supposed to
going on there, I could just have resorted to Uri's "I know
better. Don't ask why or how".

But that wasn't what I was trying to do.
 
R

Randal L. Schwartz

Ilya> Then your recollections of history are very different from mine.
Ilya> Larry did not have much (practically any?) DIRECT influence on what
Ilya> has happened after some moment - I think about 1996. (Of course, his
Ilya> legacy had - in particular "this principle of least surprise".)

sort in a scalar context was established from the moment sort was added
to Perl... and I seem to recall it being in Perl version 1.

Ilya> And Perl of today has very little resemblance to what it was in 1996.
Ilya> (Enough to say that in 1996 most of my Perl programming time was spent
Ilya> fighting bugs in Perl.)

Ilya> I suspect the return value of sort() in scalar context was discussed
Ilya> many times on p5p after that "cut-off". The current situation has very
Ilya> little to do with Larry's decisions (although the end result may
Ilya> coincide with what it was in Perl 4).

Agreed, but that's only because there wasn't any strong consensus, and I
bet if anyone really cared, Larry would still have been consulted.
 
I

Ilya Zakharevich

Ilya> I suspect the return value of sort() in scalar context was discussed
Ilya> many times on p5p after that "cut-off". The current situation has very
Ilya> little to do with Larry's decisions (although the end result may
Ilya> coincide with what it was in Perl 4).

Agreed, but that's only because there wasn't any strong consensus,

IIRC, there was a strong consensus to keep it as it is ;-).
and I bet if anyone really cared, Larry would still have been
consulted.

This is not how it was happening on p5p when I was watching...

Yours,
Ilya
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top