Re: Unpredictable programming
- From: "H. S. Lahman" <h.lahman@xxxxxxxxxxx>
- Date: Thu, 29 Jun 2006 23:23:53 GMT
Responding to Alston...
"Bruno Desthuilliers" <onurb@xxxxxxxxxxx> wrote in message
news:44a2b543$0$6509$626a54ce@xxxxxxxxxxxxxxx
What bother me here is not about OO being born from needs for simulation
- FWIW, at least part of Bob's assertion seems perfectly and obviously
true:
<quote>
(OO) is a
computational model comprising a collection of features useful for
constructing large unpredictable state machines from small
predictable state machines
</quote>
Hi Bruno and all,
(I originally write this deep in some other thread but it will probably get missed. I should have started my own thread, please ignore the other one, sorry about that :-)
I have lots of C programming experience but I'm pretty new to OOP can you
please help.
I can understand how objects are a sort of state machine but I thought OO
programs should be predictable. What's this unpredictable bit about? I know
about simulations but I write regular non-simulation apps. Ok the world
around the program may be hard to predict but just how are my "OO" programs
suppose to be unpredictable?
I don't agree with the state machine metaphor even though I use an OO methodology where all behavior is described with state machines. That's because the state machines are object state machines and their primary use is to enforce constraints on sequencing of object behaviors through the STT. The actual flow of control of the application is handling using an asynchronous, message-based communication model for behavioral collaborations between object state machines. So there is no notion of decomposing large, system-wide state machines into smaller state machines.
That flow of control can be rigorously defined using DbC because the precondition for executing any object state machine action must match the postcondition of the state where the message (event) is generated. That determinism ensures that the overall application behavior will be predictable. That determinism via DbC has been crucial to R-T/E development since long before OO. (One can make a case that the rigor inherent in object state machines and an asynchronous communication model actually facilitates applying DbC compared to approaches that do not employ state machines.)
Note that if simply using state machines was a criteria for predictability, then almost all R-T/E software would be unpredictable, whether the applications were constructed using OO or not.
*************
There is nothing wrong with me that could
not be cured by a capful of Drano.
H. S. Lahman
hsl@xxxxxxxxxxxxxxxxx
Pathfinder Solutions -- Put MDA to Work
http://www.pathfindermda.com
blog: http://pathfinderpeople.blogs.com/hslahman
Pathfinder is hiring: http://www.pathfindermda.com/about_us/careers_pos3.php.
(888)OOA-PATH
.
- Prev by Date: Re: Object identity
- Next by Date: Re: (OT) Re: Object identity
- Previous by thread: MVP with complex controls
- Next by thread: Design
- Index(es):