Path: utzoo!attcan!uunet!cs.utexas.edu!rutgers!gatech!hubcap!billwolf%hazel.cs.clemson.edu From: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu (William Thomas Wolfe,2847,) Newsgroups: comp.software-eng Subject: Re: Ada vs. COBOL study Message-ID: <5472@hubcap.clemson.edu> Date: 12 May 89 18:36:40 GMT References: <8109@thorin.cs.unc.edu> Sender: news@hubcap.clemson.edu Reply-To: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu Lines: 41 From barkley@weiss.cs.unc.edu (Matthew Barkley): > I have used FORTRAN, COBOL, Pascal, C, and BASIC during the last 20 > years. None of the other 4 comes close to COBOL in that language's > real strengths: Record-oriented I/O and reporting. I have not used > Ada, but I suspect that it isn't any better than the others. The ease > of formatting an output page in COBOL (with all the nasty editing done > for you) just doesn't exist anyhwere else, in my non-Ada experience. > Can Ada really do as well? Those who haven't used both Ada and COBOL > need not reply; I'm looking for experience, not speculation. COBOL is hard-wired; there are certain things that it's very hard to do in Report Writer, for example. I have a generic Ada report-handling package which doesn't interfere with the programmer and yet abstracts away from the details of making sure that a page feed occurs (calling the (optional) user-supplied procedure to print a page footer, doing the page feed, calling another user-supplied procedure to print a page header, resetting the "virtual line number" (provided by the package) to 1, etc., as necessary); the user-supplied procedures can utilize the full power of Ada to do their work. For example, I have a date-and-time package which will generate the date and time in any of a large number of forms. I have generic Standard_Page_Header procedures which are simply instantiated with a page title (optionally computable at run time) to give me a user-supplied page header procedure suitable for use by the report handler in about 3 minutes, which automatically prints the date and time on the left, the page number on the right, and the title in the middle. If this standard procedure doesn't fit my needs, I can quickly write my own instead, and supply *it* to the report handler. All the formatting things that are hard-wired into COBOL can be rather easily set up as formatting procedures in a formatting package. Some of the things I've done with my report handling package would have required hours to get the Report Writer to do (with legions of SUPPRESSes...). Plus there's all the maintainability, reuseability, and so on that comes with the greatly improved modularity available in Ada. In my opinion, there's simply no contest; I wouldn't seriously consider using COBOL even in the domain for which it was designed. Bill Wolfe, wtwolfe@hubcap.clemson.edu