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: f5d71,d275ffeffdf83655 X-Google-Attributes: gidf5d71,public X-Google-Thread: 146b77,d275ffeffdf83655 X-Google-Attributes: gid146b77,public X-Google-Thread: 103376,d275ffeffdf83655 X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,d275ffeffdf83655 X-Google-Attributes: gid109fba,public From: mtobler@no-spam-ibm.net (Michael J. Tobler) Subject: Re: Ada vs C++ vs Java Date: 1999/01/16 Message-ID: #1/1 X-Deja-AN: 433247510 References: <369C1F31.AE5AF7EF@concentric.net> <369CBD05.79D0@telusplanet.net> <369CBDA8.D3673C68@pwfl.com> <77np3q$e6h$1@nnrp1.dejanews.com> X-Notice: should be reported to postmaster@ibm.net X-Complaints-To: postmaster@ibm.net X-Trace: 16 Jan 1999 06:43:05 GMT, 32.100.170.227 Organization: MJT Newsgroups: comp.lang.ada,comp.lang.c++,comp.vxworks,comp.lang.java Date: 1999-01-16T00:00:00+00:00 List-Id: In article <77np3q$e6h$1@nnrp1.dejanews.com>, robert_dewar@my-dejanews.com says... [snip] > (as a matter of fact one of my PhD students, Carma McClure, > who is now married to James Martin) wrote her thesis in > this area in the mid 70's. My understanding is that you are a professor. (Correct me if I'm rwong :) > But proper COBOL style is very different from Pascal style, [snip] > This kind of in-the-small top down refinement with nice > names for sections of code makes well written COBOL easy > to read, "Nice names" and well-written programs are not reserved for COBOL programs. You can create a mess in any language. COBOL doesnt force you to write "well-written" applications. Or more maintainable code. > and by contrast the Algol (and hence Pascal, C, > Ada, C++ etc) style of using nested if's is often much less > clear. That's a matter of style. If you "nest" more than three levels of "if-else" statements, then your logic needs to be re-investigated. I find it odd that you lump Algol, Pascal, C, Ada, C++ into the same group. Why is that? > I really miss this ability to define local procedures and > use them easily in languages other than COBOL. Note that in > languages like Pascal, the syntax for simple procedure > definitions is far more verbose than in COBOL (where the > syntactic definition overhead for a procedure is the name > of the procedure and two periods), and worse, you have to > declare the procedure before you use it, exactly wrong for > this kind of called-only-once top-down-refinement approach. What it all boils down to is what you're comfortable with. You should use the language that best fits the project or problem at hand. I work on projects that may require three or four implementation languages to arrive at the finished product. Of course, in the academic world, you dont have to concern yourself with that noise :) > Now it maybe that you don't agree that this is a nice style > and prefer the nested if's of C, but too bad! If you are > writing COBOL (or any other language) part of your job is > to learn the style that is considered standard and > desirable in that language. True, but real programs dont hover around the structure of nested if-else's - what's the hang up on if-else's??? > Writing code that practioners in the language regard as > "unusual" and judge to be the result of importing > inappropriate foreign paradigms from other languages is > the sign of a poor programmer. Not necessarily...it means that the programmer is unfamiliar with the territory and doesnt have the proper guidance to properly implement a solution. That usually comes from "one-way-street" teachers and managers. > One of the great advantages of COBOL is that people who > know and understand the language well tend to write in a > very uniform style, so that people can easily read one > another's code. If you ever encountered convoluted use of > templates in C++, you will know what I mean by this failing > to be the case in some other languages. Believe me, I have seen "convoluted" COBOL, it is not restricted to the "other" languages you list. > Obviously you never really learned COBOL well, if you did > not understand that importing Pascal style is NOT the right > answer to anything. Consequently, your "Luckily" comment > is not surprising, it is always frustrating to program in > a language you do not understand! Obviously, you never really learned C++ or C or other languages you list to properly assess them. Better yet, you dont understand that different languages require different paradigms and thought processes. You can't possibly compare COBOL to C++ or Java or Algol or Ada or Modula-3. I understand what you're saying: that you cant apply Pascal programming techniques to COBOL. At the same time, you cant put COBOL in the trophy case and say other languages are inadequate. > > Robert Dewar -- <<<<<<<<<<<<<<<< Blue Skies >>>>>>>>>>>>>>>> < Michael J. Tobler: mtobler@no-spam-ibm.net > < **remove "no-spam-" when replying** > < http://www.webbrew.com/toblermj > < MJTobler:Instant Messenger; 28038932:ICQ > <<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>