I just don't see what the trouble is about, we are quibbling about semantics despite, after all, referring to the same kind of list with the same kind of property i.e. one with no members.

Describe a list that does not exist! Yet, whatever an empty list may be to you, it is perfectly well defined.

I agree, a logician may consider any object in this universe that exists takes on form or possesses property and those very characteristics define it, so if i were playing by this rule an undefined object cannot exist and I surely would not be able to describe something undefined to you.

On the other hand, a linguist may state that a noun is defined if it is quite clearly characterized, takes on form, is well delimited and can readily be expressed. An undefined noun is the opposite of this, something devoid of character, property or state e.g. an undefined term, an undefined concept, etc. Loosely they're quite akin to being indeterminate, indistinct, unknown, chaotic, empty, etc. Just because one cannot describe these entities to you does not mean they do not exist, and just because they exist does not mean they are well defined.

At home, we have a notebook beside the fridge where we write down things that need buying, on days where the page is blank and the list empty, does one consider the list to be defined or undefined?? It's defined as an empty list but undefined as a shopping list if one were to consider it a literal, blank peice of paper. What you percieve to be an undefined list depends on how mathematically pedantic you percieve a list to be, I just don't find myself to be donnish in this instance.

What is wrong with a function that plays fair -- "I give you what you give me, you give me numbers, I'll give you numbers but if you give me nothing, I'll give you nothing" ??

If you have no apples in your bag and i have no apples in my bag, what is the sum of apples we both possess?? Is there a mathematical difference when i say, "no apples" as opposed to "zero apples"?? No. Is there a logical difference, yes (atleast not in the logical sense of truth), and can i find instances where I can use this kind of behaviour to a programmatic advantage? Sure, most definitely!!


perl -e '$,=$",$_=(split/\W/,$^X)[y[eval]]]+--$_],print+just,another,split,hack'er

In reply to Re^5: List::Util::sum() and empty lists... by Firefly258
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.