[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What's so cool about Scheme?
Matt Hellige wrote:
> I suppose the poster was referring to what's usually called encapsulation,
> in that OO design practices encourage us to create objects that have
> some state, but that state is only mutable through a set of operations
> that the object chooses to expose. In this sense, these operations can
> enforce any invariants they'd like on the internal state of the object.
>
Then I would be interested in understanding how this is different from the
emphasis given to cohesion and coupling in structured programming. If
OO dosn't mean anything more than encapsulation then I suggest the term
is meaningless, as an object becomes indistinguishable from an ADT.
My understanding of the term object is rather informal but roughly
equates to:
"Objects are encapsulated state machines exchanging messages amongst
themselves, and with a number of external 'worlds'."
Not suggesting this is anything authoritive, but it was arriving at this
definition that finally allowed me to understand the concept of OO
Programming[1].
Andrae
[1] Well at least I like to think I understand OOP ;).
--
Andrae Muys But can it generate *quantum* Haiku
<andrae.muys@braintree.com.au> error messages, in Latin, where each
Engineer line of the error message is a
Braintree Communications palindrome? -- Mike Vanier on perl