because I don't have trouble understanding the value of zero/null/undef/nothing, they're all different words representing the same thing, mathematically or otherwise.

"undef" means "undefined" which is quite different from "zero" or "nothing". Perl treats "undef" as zero (or the empty string) but only after emitting a warning. The warning is only required because "undefined" does not mean the same things as "zero", "nothing", nor "empty".

In C, NULL mostly means "zero" but is often used for "missing" which might represent "undefined". In SQL, NULL means "not present" which is close to "undefined". The this built-in confusion on what "null" means could easily spread to confusion on what "undefined" means.

If you called your bank and asked for balance and they said "I don't know; the computer system is down for maintenance and I can't look it up right now", then that would be getting a balance of "undefined" (or "unknown"). This is much different than a balance of "zero". Surely you can see that.

So it appears that you do have a problem understanding a couple of those terms.

- tye        


In reply to Re^8: List::Util::sum() and empty lists... (undefined) by tye
in thread List::Util::sum() and empty lists... 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.