Re: How is Behavior Specified

From: Dmitry A. Kazakov <>
Date: Fri, 4 Apr 2008 15:12:45 +0200
Message-ID: <fgibxqj4gd1b.1e6tzusihzhnb$>

On 4 Apr 2008 12:49:10 GMT, Stefan Ram wrote:

> "David Cressey" <> 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.
Dmitry A. Kazakov
Received on Fri Apr 04 2008 - 15:12:45 CEST

Original text of this message