In a recently mentioned clpmisc thread (link @ GG), in some post I claimed the following:

Because the behaviour is *not* factorized: had Perl aimed at blind consistency, perhaps it would have had functions that always return a list and lists coerced in scalar context would always evaluate to their lengths. Instead the driving principle has always been that of DWIM, and most often it has succeeded IMHO. Since sort in scalar context can hardly mean anything but possibly for some awkward side effect, it has been chosen to have an undefined behaviour.

(emphasis added now)

To which Ilya Zakharevich, who is more than knowledgeable enough to give a judgment, answered:

I'm afraid I must call this BS. ;-) ;-( The driving principle was "graduate growth", and a lot of shortcomings just were not noticed quick enough - and when ramifications were noticed, it was too late to change things due to backward compatibility.

Comments? Ideas? Anything to add?


In reply to Perl's driving design principle by blazar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.