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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |