BrowserUk makes a number of good points and he's arguing from a sound starting point. Objects are way overused and, ofttimes, there are much better ways of handling things.

The point behind objects is to have intelligence. I have recently written a SQL parser. The parser emits a whole mess of objects and I think BrowserUk would agree with why. The first is that the whole thing knows how to stringify itself, from any point. The second is that I can descend the parsetree simply and easily without needing to know how its represented. Most parsetrees are somewhat regular. SQL's isn't. Hence, hiding complexity.

Your point, too, is well-taken. But, it's not a point about objects - it's a point about APIs. Your same point can be made about good libraries, too. Take Perl. It's a program that responds to an API. Do you care how hashes are implemented? The hashing algorithm changed signficantly between 5.6.0 and 5.6.1 - did you notice? Did you even know?


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

In reply to Good APIs are the key (was Re: Make everything an object?) by dragonchild
in thread Make everything an object? by wfsp

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.