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: 109fba,df854b5838c3e14 X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,df854b5838c3e14 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,df854b5838c3e14 X-Google-Attributes: gid103376,public From: ok@goanna.cs.rmit.EDU.AU (Richard A. O'Keefe) Subject: Re: C/C++ knocks the crap out of Ada Date: 1996/02/22 Message-ID: <4ggshe$7bk@goanna.cs.rmit.EDU.AU>#1/1 X-Deja-AN: 140559162 references: <00001a73+00002504@msn.com> <4etcmm$lpd@nova.dimensional.com> <312515DF.7D3B@cmlj.demon.co.uk> <4gad29$ddp@druid.borland.com> organization: Comp Sci, RMIT, Melbourne, Australia newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++ Date: 1996-02-22T00:00:00+00:00 List-Id: In article <312515DF.7D3B@cmlj.demon.co.uk>, chris@cmlj.demon.co.uk says... >With regards to maintenance, there's many people out there who consider >C/C++ a Write only language. pete@borland.com (Pete Becker) writes: >How many of the people who say this have actually used C++ enough to >understand it? (1) Almost any programming language is going to be called "write-only" by people who have not worked with it for a bit. (2) "Notation as a tool of thought": there are some really brilliant notations which can actually help you think more clearly about some things. APL is a case in point: I have found it a very powerful notation for a small class of problems; within that class trying to keep it simple often led me to a specification with fewer "rough edges". The notation could be abused; it often was abused; and it was limited. Mathematical notation in general can be concise, verbose, revealing, hopelessly obscure. You have to combine even the best notation with a sense of elegance and some consideration for your readers. (3) Precisely because they are popular, C and C++ are used by a lot of programmers who shouldn't be allowed near a keyboard without a helmet and padded knees. There is a lot of extremely bad C and C++ code. It is easy for a language to get a bad reputation when nearly every book you see has dreadful code in it. (4) C++ in particular has been changing very rapidly. It seems as if every time I turn around there is a new keyword. I was looking at some code fragments today in a book; they were full of things like void HelpIndex () (RTMessage) = [CM_FIRST+CM_HelpIndex]; I've used three C++ compilers, read every book with "Stroustrup" on it, and keep on browsing through the draft standard, and haven't the foggiest notion what this is supposed to do. If a few keywords had been used instead of punctuation marks, I might have been able to figure it out... Conversely, there's a program I was given in 1988, written in C++, that I haven't been able to compile for years, so today's _compilers_ think it isn't "readable" (sad smiley). (5) Let's be clear about the goals and accomplishments of C++. It was designed to make it easy for skilled programmers to WRITE large object-oriented programs. It is obvious to any fair observer that it has accomplished these goals. It was _not_ designed with readability, formal verification, or protecting idiots from themselves in mind. (6) In the world of software engineering, easy to read is better than easy to write, even Homer nods to protecting idiots like me from ourselves is thought to be important, and some level of verifiability is thought to be a Good Thing. (Come to think of it, the way Alphard 'form's were annotated should carry over nicely to C++ classes, so how come such annotations are so rare in the code I've seen?) (7) Intentionally left blank. -- Election time; but how to get Labor _out_ without letting Liberal _in_? Richard A. O'Keefe; http://www.cs.rmit.edu.au/~ok; RMIT Comp.Sci.