in reply to Re: On the rejected additions to List::Util
in thread On the rejected additions to List::Util

That is not very DWIM. I take engineering software seriously. And aim for readability and conciseness. DWIM supports that greatly.
  • Comment on Re^2: On the rejected additions to List::Util

Replies are listed 'Best First'.
Re^3: On the rejected additions to List::Util
by mr_mischief (Monsignor) on May 01, 2009 at 20:52 UTC
    How do you average numbers when you don't have a computer? I can't think of a more readable and DWIM-my way of writing something than by expressing the very definition of how it'd be done by hand.
Re^3: On the rejected additions to List::Util
by ikegami (Patriarch) on May 06, 2009 at 17:04 UTC

    Kids learn the average is the sum divided by the count at a young age, so it's definitely readable.

    As for conciseness, sum(@list)/@list is really not that far off from avg(@list)

    Nothing is stopping you from putting that expression in a sub if you think it's not readable or concise enough.