Why stop with lists?

You can make your data type even more elegant and inefficient by constructing everything from sets. The mathematics of set theory is rock solid, and it's what mathematicians actually use as their theoretical underpinnings for almost all of mathematics.

Sets will give you what you seem to be looking for; maximum theoretical abstraction, with a minimum of real world application. As a mathematician, I'm not fond of excessive abstraction. You just have to abstract back up the chain to build up useful abstractions again, like complex numbers, addition, subtraction, and so forth. Few mathematicians bother to describe addition in terms of the underlying set theory, except to prove that it can actually be done.

Real world applications need useful data types. Strings should always be a built in data type; any language that lacks strings as a built-in data type ends up building them right back into the language again using some sort of standard library. From a practical standpoint, the only real difference between a feature that's in the core language and a feature that's in a core library is the extra commands required to include the library, and how awkward the syntax is.

--
Ytreq Q. Uiop


In reply to Re: Representing all data as Lists by Anonymous Monk
in thread Representing all data as Lists (Perl7?) by rje

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.