From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4b06f8f15f01a568 X-Google-Attributes: gid103376,public From: Al Christians Subject: Re: Expressive Case Statements (was: Software landmines) Date: 1998/09/04 Message-ID: <35F09429.1A7CD250@easystreet.com>#1/1 X-Deja-AN: 388031155 Content-Transfer-Encoding: 7bit References: <902934874.2099.0.nnrp-10.c246a717@news.demon.co.uk> <6r1glm$bvh$1@nnrp1.dejanews.com> <6r9f8h$jtm$1@nnrp1.dejanews.com> <6renh8$ga7$1@nnrp1.dejanews.com> <6rf59b$2ud$1@nnrp1.dejanews.com> <6rfra4$rul$1@nnrp1.dejanews.com> <35DBDD24.D003404D@calfp.co.uk> <6sbuod$fra$1@hirame.wwa.com> <35f51e53.48044143@ <904556531.666222@miso.it.uq.edu.au> <35EAEC47.164424A7@s054.aone.net.au> <6sgn8l$7aq$1@nnrp1.dejanews.com> <6sh487$lnq$1@nnrp1.dejanews.com> <6shit4$eaj@dfw-ixnews5.ix.netcom.com> <35ECDA3F.3372@atlas.otago.ac.nz> <6sk22v$oal@dfw-ixnews4.ix.netcom.com> Content-Type: text/plain; charset=us-ascii X-Trace: news14.ispnews.com 904958479 206.103.35.50 (Fri, 04 Sep 1998 21:21:19 EDT) Organization: Trillium Resources Corporation MIME-Version: 1.0 Reply-To: achrist@easystreet.com NNTP-Posting-Date: Fri, 04 Sep 1998 21:21:19 EDT Newsgroups: comp.lang.ada Date: 1998-09-04T00:00:00+00:00 List-Id: This brings up a larger question that is perhaps beyond the scope of c.l.a., but I would be interested in the thoughts of the experts here on this subject: What should go into data and what should go into the program? For example, it would generally be theoretically possible to create a giant relational database where all the possible answers from a program could be looked up based on all the possible inputs. We don't usually do that, but how does one correctly decide what is best to code as program logic and what is best to code as data? A decision table is a way of presenting a representation of information that is about midway between that that obviously ought to be programmed and that that clearly ought to be left as data. Any general rules to apply in this analysis? How does programming language affect these tradeoffs? Al Richard D Riehle wrote: > > Absolutely true statement. The number of combinations is > exponential. When you get beyond three conditions the > problem can become unwieldy. This is the beauty of decision > tables. Ridiculous choices can be identified immediately and > discarded. The COBOL Evaluate statement allows you discard those > inappropriate choices in a readable and well-documented syntax. > > >Decision tables became unfashionable; I never understood why. > > I'm with you. I once used a language called LOBOC (COBOL spelled > backwards) that was based on decision tables. Unfortunately, one > also had to embed Assembler (Autocoder for those of you ancient > enough to remember it) in the code. The decision tables greatly > enhanced our ability to reason about complex relationships between > choices and to rule out those that were nonsense. They also forced > us to ask questions about the possibility of a certain set of > situations ever occurring. This helped with error management. >