in reply to Object Terminology

Nice start stvn!

Here are my observations and questions about this draft, since you asked :)

General Comments

Specific Comments

Please don't take any of this as negative criticism. As I said, I think what you've written so far is a good start.

__________________
Update: Added bullets for clarity

Replies are listed 'Best First'.
Re: Re: Object Terminology
by stvn (Monsignor) on Jan 12, 2004 at 14:32 UTC
    Edward

    Please don't take any of this as negative criticism.
    Not at all. Your comments are exactly what i am looking for!

    I can see now that comments like "greatly misunderstood" are really too much my opinion, and probably need to either edited out or explained better. I was initially not going to provide any links, since i felt it might muddy up the simplicity, but you make a good point, so maybe I will provide a "further reading" type section.

    Anybody got any good OO links they want to suggest, I am all ears. (I've got my own, but I dont know them all)
    Your specific comments in particular are right on. I will take them all under advisement as i do the first re-write.

    Thanks again, excellent comments.

    -stvn
      Here's a start: As a side note, I would emphasize that interfaces in Java also represent a sort of inherent 'contract', basically saying, "All objects of this type will have these methods, and those methods should do this". They impose a type constraint over the object, which in turn allows for polymorphism without inheritance, which in turn is a good thing. Inheritance breaks encapsulation by giving you intimate knowledge and access to your super classes' wibbly bits. The bottom line is you should usually give some thought to whether or not a class is going to be inherited from, and what will happen if it is inherited from. Otherwise, overriding certain behavior and not others can break code in unpredictable ways (this has bitten me on the ass enough times to make me worry about it).

      Of course, there are many times when inheritance is useful, and I certainly do use it a lot. Superclasses are typically very bare abstract classes with only common behavior, however, and are not typically instantiated by themselves.

      But that's just like, my opinion, man :).
      Allen