Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
A famous philosopher believed that discussion progressed by starting with a thesis, confronting it with its antithesis. And then they mix into a synthesis. As much as I don't care for that philosopher's political philosophy, there is quite a bit of truth to the concept that the best way to expose people to diversity is to expose them to conflicting views. And interesting discussions frequently start with a significant disagreement, carefully explored.

Let's take your example a little further. Time is a class. A Time object has properties like "year", "month", "day", "hour", etc. What is the relationship then between Time and TimeZone? Does Time only have an hour in the context of a TimeZone? Or is the same split second in London a different Time than that split second in Los Angeles?

Going further, time is a more complex thing than your model holds. For a layman, this NY Times article doesn't do a bad job of explaining why. Attempting to produce a Time class that models the intricities of, say, metrics and varying versions of local time is very hard. Using such a beast is even more insane. Now for 99.9999% of the code out there (maybe more, maybe fewer 9's) the complications don't matter and it makes perfect sense to have a naive concept of Time. But for the fraction of a percent that does, you have a lot of fun waiting. An example in that fraction of a percent is the code used internally by the GPS satellites. (Did you know that GPS not only has to take into account corrections from Einstein's Special theory of Relativity, but also the general? Yup, the satellites are able to detect that their clocks run faster due to being farther out of the Earth's gravitational well!)

On misuse of the tool of OO design, my statement is not that I misuse the tool. It is that the tool simply has natural limitations. Typically those limitations don't prevent us from being able to do what we want (though they may complicate it). Rarely they do. Much more often, people who haven't yet learned a good balance between theory and practice create theoretical but impractical designs.

And finally I admit that if you limit your perceptions, you can shoehorn everything into an OO framework. I've seen people who seem to do this. I have no way to know whether you do - all that I can judge you by is what you write. However your post staked out an extreme position, and I certainly can critique the position that I understood your post to be making. This I have tried to do.


In reply to Re: Re: The world is not object oriented by tilly
in thread The world is not object oriented by tilly

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-03-19 04:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found