But the return value of hex() usually isn't an integer in the CPU-register sense!

Right, it's an IV, which points to a native integer.

And even when it is, plenty of languages can handle 64-bit integers on 32-bit hardware.

With the appropriate amount of emulation, yes.

Note that perl is written in C, and I don't think that C makes any guarantees for the availability of a 64 bit integer type. Many other language implementations "solve" this problem by ignoring platforms or compilers that don't do what they want, but perl's focus is usually stronger on portability.

There's no law that states that all variables must fit into a single CPU register. (How would strings ever work if that were the case?)

Sure there's no such law, but if they don't, they are generally not as efficient.


In reply to Re^3: Is there a 64-bit hex()? by moritz
in thread Is there a 64-bit hex()? by kornerr

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.