From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,8be18979db11f51c X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,fb631c9316319fef X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 2001-02-28 05:52:09 PST Path: supernews.google.com!sn-xit-03!supernews.com!nntp.cs.ubc.ca!newsfeed.direct.ca!look.ca!news-hub.cableinet.net!cspc1n11e.baplc.com!plug.news.pipex.net!pipex!tube.news.pipex.net!pipex!not-for-mail From: "LJEB" Newsgroups: comp.os.vms,comp.sys.dec Subject: Re: Drop C/C++ better sooner than later Date: Wed, 28 Feb 2001 13:48:58 -0000 Organization: UUNET WorldCom server (post doesn't reflect views of UUNET WorldCom Message-ID: <97ivjt$96k$1@soap.pipex.net> References: <87n1baae6s.fsf@prep.synonet.com> <97bm3a$7tv@gap.cco.caltech.edu> <3A99AED0.5DF07890@infopuls.com> <97cd06$hcn$1@pyrite.mv.net> <97egck$vc6$3@info.cs.uofs.edu> <3A9AEFCD.AFC8431@infopuls.com> <97etsu$j41$1@pyrite.mv.net> <3A9B023A.CBD414A5@infopuls.com> <3A9C2B88.8032D829@infopuls.com> NNTP-Posting-Host: news.axl.co.uk X-Trace: soap.pipex.net 983368125 9428 194.201.74.40 (28 Feb 2001 13:48:45 GMT) X-Complaints-To: abuse@uk.uu.net NNTP-Posting-Date: 28 Feb 2001 13:48:45 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Xref: supernews.google.com comp.os.vms:20496 comp.sys.dec:2904 Just sticking my 2c in on a few things here late in the thread... > > Believe me, I am NOT a defender of C. There are many things I HATE > about C. Here's 4 of them: > > 1. Case Sensitivity. I am use to it, but I think it is a BIG > problem. tmp, TMP, Tmp, tMp, tmP, TMp, tMP should NOT refer > to different things. In a programming language I don't find this problem, then again having simple coding standards which prohibit doing this helps. On the other hand having a file system that does this (and worse) is hell. > > 2. SWITCH/CASE doesn't auto-break. I NEVER depend on being able > to fall through to the next CASE in a SWITCH statement. The > default should be BREAK and allow specifying CONTINUE if you > want to drop through. THIS IS A BIG PROBLEM!!! I would have to say NO! I use this feature from time to time, and when needed it can very useful, and saves unnecessary tests and duplicated code. Apart from that I think that I cannot remember when a missing "break" caused me any problems the last time, it was so long ago. Also "continue" has a completely defined and simple function. > > 3. BREAK. Break should be allowed from ALL Begin/End ({}) > constructs (including IF ELSE). You should also be able to > BREAK # where # is the number of Begin/End blocks you want > to break out of. Sorry but this is about the most horrible suggestion for any language I have ever seen. Next you'll suggest that a computed goto's like in Fortran would be nice. This would be event worse than using goto in you code (goto is completely band by our C/C++ coding standards), this would make maintaining code hell, every little modification to a module a hazard, causing untold problems if just one break# was missed and not updated. Simply speaking if your code is that complex try splitting it into separate functions, and check your logic. > > 4. Use of "==" for compares. It's WAY too easy to put in "=" > instead. In fact, I usually do a specialized search of ALL > my code before the first compile just to try and catch these. > I used to make that mistake when I first started in C (about 15 years ago), but I soon got over it. Yes this occationally stoll happens, but usually the effect is quite obviouse within the first hour or so of testing. Also many modern compilers do warn of this at compilation time now, so the problem is not like it was. I have been writing in C and more recently some C++ for about 15 years, and I will admit that I have seen some awful code written in both languages. The problem with bad code, which is difficult to follow, overly complicated, not commented, and just down right sloppy, has almost nothing to do the language in my view. I have also seen terrible code written in Fortran, Basic, Java and others, the problem is poorly skilled programmers or programmers who just don't care. You can always say that in one language something could be done simpler (usually simpler for the developer not the machine), but that will always be the case. Programming languages are like any other tool you use, be it a paint brush, screwdriver, saw, or club hammer. In the hands of someone who understands how to use them they can create almost anything, in the hands of a novice they usually make a mess. Laurence Blunt.