Re: How is Behavior Specified
Date: Fri, 4 Apr 2008 15:12:45 +0200
On 4 Apr 2008 12:49:10 GMT, Stefan Ram wrote:
> "David Cressey" <cressey73_at_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.deReceived on Fri Apr 04 2008 - 15:12:45 CEST