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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID 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 X-Google-Thread: 1108a1,9a0ff0bffdf63657 X-Google-Attributes: gid1108a1,public X-Google-Thread: f43e6,9a0ff0bffdf63657 X-Google-Attributes: gidf43e6,public From: dewarr@my-dejanews.com Subject: Re: Software landmines (loops) Date: 1998/10/15 Message-ID: <704p6o$l7q$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 401321687 References: <1dghyt5.oik1lzhxzf2N@n207167116176.inetworld.net> <1dgt6f1.1oau40z1p1ueeuN@n207167116181.inetworld.net> <3624700D.52F1@dmu.ac.uk> X-Http-Proxy: 1.0 x3.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Thu Oct 15 12:18:33 1998 GMT Newsgroups: comp.object,comp.software-eng,comp.lang.ada X-Http-User-Agent: Mozilla/2.02 (OS/2; I) Date: 1998-10-15T00:00:00+00:00 List-Id: In article , behrends@cse.msu.edu (Reimer Behrends) wrote: > Graham Perkins (gperkins@dmu.ac.uk) wrote: > [...] > > Also we often find "main program" which consists of a single procedure > > call, and many individual procedures which consist of nothing but > > two or three parameter-less procedure calls. > > > > We try to reform such people before they graduate!! But many > > slip through. > > Well, I hope so. :) An abstraction (procedure or class) is a good > abstraction because it embodies a useful concept, not because it saves > space. I often tell students that if I see a large program which does NOT contain instances of subprograms called only once, it is misstructured. Indeed I find it annoying that many modern programming languages make it harder than necessary to introduce simple "refinement" procedures in two ways: 1. They require the declaration before the call, which is annoying in this case, since the program then is written "upside down". 2. They require a lot of syntax One of the most attractive features of COBOL is its economical syntax for this kind of refinement: check-balance. if balance > 0 then perform record-credit else perform send-bill end-if. record-credit. ... send-bill. ... Lambert Meertens ABC language provides a similar functionality as did Koster's CDL. But many modern Algol-derived languages are lacking in this area, and as a result one often sees conditionals nested annoyingly deep in an effort to avoid clarifying refinements. Robert Dewar -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own