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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a9b0810d3106d9b8 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!w36g2000vbi.googlegroups.com!not-for-mail From: "George P." Newsgroups: comp.lang.ada Subject: Re: Fun with C Date: Mon, 18 Apr 2011 19:43:58 -0700 (PDT) Organization: http://groups.google.com Message-ID: <8dbc6e36-3f53-4a44-8b3e-7dcf5964b6f2@w36g2000vbi.googlegroups.com> References: <27cf3992-4132-4483-9110-adc7a089cd4a@e8g2000vbz.googlegroups.com> <54108d8d-4e7c-4901-bd5e-819d27720d48@a11g2000pro.googlegroups.com> <4daa8fc6$0$7652$9b4e6d93@newsspool1.arcor-online.net> <37428a21-61b4-4cdf-9897-7b84252f8fce@a11g2000pro.googlegroups.com> <4dab6906$0$6893$9b4e6d93@newsspool2.arcor-online.net> <57a1fa4b-4730-41a8-be8a-82061ef9dc22@x37g2000prb.googlegroups.com> <4daca6ba$0$6773$9b4e6d93@newsspool3.arcor-online.net> NNTP-Posting-Host: 108.3.157.162 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1303181038 9730 127.0.0.1 (19 Apr 2011 02:43:58 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 19 Apr 2011 02:43:58 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: w36g2000vbi.googlegroups.com; posting-host=108.3.157.162; posting-account=VnNb3AoAAACTpRtCcTrcjmPX7cs92k1Q User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6.6; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; Tablet PC 2.0; .NET4.0C; .NET4.0E; BRI/1; BRI/2),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:19856 Date: 2011-04-18T19:43:58-07:00 List-Id: On Apr 18, 5:20=A0pm, "Nasser M. Abbasi" wrote: > On 4/18/2011 2:01 PM, Georg Bauhaus wrote: > > Someone who programs in C/C++ and other weakly > typed languages, can spend 5 days to find a bug, > then they would feel so proud of themselves, and may > be even get a raise from the boss, because they > keep finding more bugs. > > But if they would have used a better language, > a more strongly typed language, then this time would > have been saved to work on the design and the algorithm > itself, and think about the problem itself. > >... > > --Nasser How true. I know good C coders that show very little interest in application part of software design. The pride is built around performance gains individual can produce. That rarely exceeds 10-20% though. The fundamental difference between C and other languages in my view, is that C is not exactly a high level programming language. It is built around simple mini-computer architecture and as such is limited by it. It has it's place ofcorse. After all, one can write compilers generating C code. Coming back to my project here is the JSF Coding standard rules that we follow indeed states: http://www2.research.att.com/~bs/JSF-AV-rules.pdf AV Rule 162 Signed and unsigned values shall not be mixed in arithmetic or comparison operations. Rationale: Mixing signed and unsigned values is error prone as it subjects operations to numerous arithmetic conversion and integral promotion rules. Obviously that one slipped through. No wonder since these rules are 141 pages long. Well, computers are still programmed by humans (unfortunately) ;-) --