|
Prev: Aspect oriented programming
Next: OO Question
From: David Cressey on 4 Apr 2008 08:15 How is behavior specified? In particular, is the specification expressed as declaratives or as imperatives?
From: H. S. Lahman on 4 Apr 2008 09:04 Responding to Cressey... > How is behavior specified? > > In particular, is the specification expressed as declaratives or as > imperatives? The short answer is: anyway you want -- so long as the specification semantics are compliant with the UML execution meta model. -- There is nothing wrong with me that could not be cured by a capful of Drano. H. S. Lahman hsl(a)pathfindermda.com Pathfinder Solutions http://www.pathfindermda.com blog: http://pathfinderpeople.blogs.com/hslahman "Model-Based Translation: The Next Step in Agile Development". Email info(a)pathfindermda.com for your copy. Pathfinder is hiring: http://www.pathfindermda.com/about_us/careers_pos3.php. (888)OOA-PATH
From: Dmitry A. Kazakov on 4 Apr 2008 09:12 On 4 Apr 2008 12:49:10 GMT, Stefan Ram wrote: > "David Cressey" <cressey73(a)verizon.net> writes: >>How is behavior specified? > > The behavior of an object is specified by source > code in an object-oriented programming language > (often by a class). Code as a specification? That does not look much OO, I would say. Actually some parts of the code specify, others implement the behavior. Good OOPLs provide means to separate specifications and implementations in a clear way. Further specifications are usually purely declarative [*]. Implementations could be mixed. For example, when a method is inherited, its implementation is given in a declarative way and constructed by the compiler. ------------------ Of course there is no crisp boundary between declarative and imperative. Each declarative construct is imperative for the meta language of declaration. So, for example, declaration of a derived type is imperative for the language of types. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de
From: Dmitry A. Kazakov on 4 Apr 2008 10:07 On 4 Apr 2008 13:24:56 GMT, Stefan Ram wrote: > "Dmitry A. Kazakov" <mailbox(a)dmitry-kazakov.de> writes: >>Code as a specification? That does not look much OO, I would say. > > Fine. Then, how does one specify the behavior of an object, > if not by code? Which code is meant here? One necessary property of specification is verifiability of an implementation against it. When implementation becomes a specification of itself, then bags go to Milan... > http://www.developerdotstar.com/mag/articles/reeves_design_main.html Huh, if somebody didn't want to design, why then would he call the result of his activity a design? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de
From: Phlip on 4 Apr 2008 10:26
David Cressey wrote: > How is behavior specified? > > In particular, is the specification expressed as declaratives or as > imperatives? As a series of unit tests, each using assertions which are generally imperative. The methods in the objects are more declarative. -- Phlip |