Path: text.usenetserver.com!out02a.usenetserver.com!news.usenetserver.com!in02.usenetserver.com!news.usenetserver.com!postnews.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!post01.iad01!post02.iad01!roadrunner.com!not-for-mail From: "Leslie Sanford" Newsgroups: comp.databases.theory,comp.object References: <_ZoJj.3574$at6.3220@trndny01> Subject: Re: How is Behavior Specified Date: Fri, 4 Apr 2008 12:26:19 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Original Lines: 37 Message-ID: <47f664e3$0$12545$4c368faf@roadrunner.com> Organization: Road Runner High Speed Online http://www.rr.com NNTP-Posting-Host: 76.186.73.164 X-Complaints-To: abuse@rr.com Xref: usenetserver.com comp.databases.theory:171201 comp.object:265570 X-Received-Date: Fri, 04 Apr 2008 12:26:59 EST (text.usenetserver.com) "David Cressey" wrote: > How is behavior specified? > > In particular, is the specification expressed as declaratives or as > imperatives? I think it would be a mixture of both. At some level you have to write the code that actually implements the algorithms/behavior. Once the implementation is done, the "How" of the matter, you can move up a level in abstraction and use a more declarative approach, the "What" of the matter. So if I do something like this: class DarkStar { public: // Stuff... void CancelBombDetonation() { // Code that actually implements the cancel bomb detonation // algorithm... have philosophical conversation with bomb // to convince it not to blow up... } }; The code for the CancelBombDetonation method is imperative; it determines how the algorithm is carried out. I can now take a more declarive approach: darkStar.CancelBombDetonation(); At the level where the behavior is invoked, I don't care about how the algorithm is implemented, only that it does *what* I expect. Does this make sense?