Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!rutgers!att!pegasus!psrc From: psrc@pegasus.ATT.COM (Paul S. R. Chisholm) Newsgroups: comp.software-eng Subject: Re: Computer langauges and software lifecycle - references request Summary: um, Cobol? Message-ID: <2846@pegasus.ATT.COM> Date: 30 Apr 89 05:24:17 GMT References: <570@umiami.miami.edu> <432@bnr-fos.UUCP> Organization: AT&T Bell Laboratories Lines: 46 In article <432@bnr-fos.UUCP>, schow@bnr-public.uucp (Stanley Chow) writes: > Amazingly, it is possible to write good modular code in COBOL. It takes some > discipline but is certainly an order of magniture easier than doing so in C. Excuse me? C has global variables, variables that can be local to a module (source file), and both temporary and long-lived variables local to functions (subroutines). Cobol has global variables, and very limited subroutines (PERFORM). > It [Cobol] is also very fast even with minor tuning I agree. Cobol stores numbers in a way that makes simple arithmetic reasonably efficient (and as precise as you'd usually want), and makes I/O very efficient. Most of what typical Cobol programs do is the equivalent of lots of string copies, which C needs a function call for. > If I may preempt some objections to COBOL: > - Verbose. > True but irrelevent. Proficent programs can knock out COBOL just as fast > as C hackers can crank out filters in C. Maybe not. Some studies show that programmer productivity seemed to be proportional to the number of lines of code, regardless of the language. If that's true, a concise language helps. (Besides, C hackers crank out filers in sh, built out of other filters, written in sh or C.) > - Not-block structured, no variable scoping. > Again, true but irrelevent. Most shops have set up variable naming rules > so that scoping is not needed. Rules the compiler can't check for you. The lack of true local variables precludes recursion, unless you build your own stack. > - Poor choice of control structures. > True, but in the right domain, the COBOL paradigm is very effective. I'd say the same thing for good 4GL's. The intersection of their domains is pretty large, and the 4GL's are more concise. > Stanley Chow ..!utgpu!bnr-vpa!bnr-fos!schow%bnr-public Paul S. R. Chisholm, AT&T Bell Laboratories att!pegasus!psrc, psrc@pegasus.att.com, AT&T Mail !psrchisholm I'm not speaking for the company, I'm just speaking my mind.