I think a better example is the "actual time". The actual time, is a constantly changing value, which is read-only.

That is no better example.

Application code, whether Perl or C/C++ or any other language, does not have direct access to the hardware timers that underlie real-time clocks.

Therefore, it makes no sense for an application class or object to have a "actual time" attribute. They may have an actual time method, but that will of necessity make a system call to obtain the value.

Even if the class we were discussing was a kernel system class, an "actual time" method would still not return a direct read of a read-only attribute. Clocks are volatile hardware counters, and they do not count in program usable real-time units directly. They count in something related to bus clocks, which vary from processor to processor, and even with the current energy saving or turbo boost states.

So, any "actual time" method is going to involve some conversion from hardware clock units to real-worlds units. In other words, it is going to be a derived value.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re^4: Psychic Disconnect and Object Systems by BrowserUk
in thread Psychic Disconnect and Object Systems by John M. Dlugosz

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.