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 | |
by blazar (Canon) on Jul 23, 2007 at 13:57 UTC | |
by ForgotPasswordAgain (Vicar) on Jul 23, 2007 at 11:34 UTC | |
|
Re: Perl's driving design principle
by CountZero (Bishop) on Jul 23, 2007 at 20:46 UTC | |
by jdporter (Paladin) on Jul 23, 2007 at 21:39 UTC | |
by CountZero (Bishop) on Jul 24, 2007 at 06:48 UTC | |
by jdporter (Paladin) on Jul 24, 2007 at 11:25 UTC | |
|
Re: Perl's driving design principle
by Anonymous Monk on Jul 23, 2007 at 11:39 UTC |