Help With Better Design
bruno.42.desthuilliers at wtf.websiteburo.oops.com
Thu Jun 21 09:22:34 CEST 2007
apollonius2 at gmail.com a écrit :
>>> I would like to be able to get a good hold of the concept
>> state machines ?
> Well both state machines and classes (objects). That may be a bit of a
> tall order to take on all at once but the concepts seem to be quite
They are, since OO was born from the use of state machines for
simulation (the Simula language). But you can do state machines with a
database and a procedural language too, and FWIW, the "state machine"
aspect of OO is more often very informal and ad hoc.
> I already have a great deal of material on Classes so good to
> go there.
Don't confuse "classes" with OO. The "OO" in OOP means
"object-oriented", not class-oriented, and nothing in the most basics
definitions of OO  requires nor even imply the notion of "class".
This notion is mostly an artifact for easing the definition of a family
of objects having similar implementation, and some 00 languages managed
to get by without classes (look for "prototype-based languages" - the
too, and instances have a reference to their class. Since one can
dynamically modify the instance object -> class object relation at
runtime, we're quite close to prototype-based languages !-)
 "an object is defined by an identity, a state and a behaviour."
More information about the Python-list