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?

Replies are listed 'Best First'.
Re: Perl's driving design principle
by BrowserUk (Patriarch) on Jul 23, 2007 at 11:25 UTC

    Aaaarh! Eeeeeewe! Ew-ew, ew-ew, ew! Ew-ew, ew-ew, ew! Oh?
    Aaaarh! Eeeeeewe! Ew-ew, ew-ew, ew! Ew-ew, ew-ew, ew! Oh?

    It's a bungle, a mighty bungle; a list, in scalar con-text.
    Oh it's a bungle, quite-a bungle; a list, in scalar con-text.

    DWIM-awry. DWIM-awry. DWIM-awry. DWIM-awry.
    DWIM-awry. DWIM-awry. DWIM-awry. DWIM-awry.

    In the future, the Perl 6 future; the list will do it right.
    Oh, in the future, the quite soon future; the list will do it right.

    DWIM-away. DWIM-away. DWIM-away. DWIM-away.
    DWIM-away. DWIM-away. DWIM-away. DWIM-away.

    So hush my darlings; don't fear my darlings; Perl 6 will do it right.
    So hush my darlings; don't fear my darlings; Perl 6 will do it right.

    Aaaah. Mmmmmmmm! Mm-mm, mm-mm, mmm. Mm-mm, mm-mm, mmm Aaaaaah.
    Aaaah. Mmmmmmmm! Mm-mm, mm-mm, mmm. Mm-mm, mm-mm, mmm Aaaaaah.

      Wonderful, BrowserUk, simply wonderful! Is it perhaps a concidence that yesterday I saw a show by some young girls and boys comprising a series of ballets inspired by several Disney's cartoons, with one using "this" song as a basis? Well, I learnt there for the first time, having never seen the movie itself, that Hakuna Matata means "no worries (here)", and I reasoned that it reminded me, with the obvious differences, of Mushin, the state of "empty mind" in which samurai were said to fight: no worries, no though, no hesitation. A sensation which I've felt -however ridiculous- may it sound, while playing Tetris, at a point in which the game began to be automatic and did I pay no care to the points or anything whatsoever - and I could play like that for long, usually until a thought distracted me. Think of reaching the same state when severe injury or your own life is a possibility! Well, said this the next step is obvious: how good is Perl 6 as a martial art for the 21st century samurai? Will it provide us a Katana, and a Wakizashi too? (I don't know how much $Larry would like these metaphors...)

      I doubt it.
Re: Perl's driving design principle
by CountZero (Bishop) on Jul 23, 2007 at 20:46 UTC
    Never attribute to malice what could be explained by stupidity.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      Never attribute to stupidity that which can be adequately explained by malice.
      (Not that this applies in this case, however.)
        I tend to to take a more optimistic view of mankind, but YMMV.

        Count Zero

        A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Re: Perl's driving design principle
by Anonymous Monk on Jul 23, 2007 at 11:39 UTC
    I claim ESPN