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!f31g2000pri.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Elias_Salom=E3o_Helou_Neto?= Newsgroups: comp.lang.ada Subject: Re: Fun with C Date: Mon, 18 Apr 2011 12:24:25 -0700 (PDT) Organization: http://groups.google.com Message-ID: <08279ed8-61de-414e-a53c-996bc0ae2ba9@f31g2000pri.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> NNTP-Posting-Host: 143.107.183.162 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1303154666 30637 127.0.0.1 (18 Apr 2011 19:24:26 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 18 Apr 2011 19:24:26 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f31g2000pri.googlegroups.com; posting-host=143.107.183.162; posting-account=8auP9QoAAACkSx2qxJhP83KA6-tg78E8 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.8 SUSE/7.0.528.0 (KHTML, like Gecko) Chrome/7.0.528.0 Safari/534.8,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:19839 Date: 2011-04-18T12:24:25-07:00 List-Id: On Apr 17, 9:12=A0pm, "George P." wrote: > On Apr 17, 3:35=A0pm, Elias Salom=E3o Helou Neto > wrote: > > > > > > > > > > > On Apr 17, 1:15=A0pm, KK6GM wrote: > > > > On Apr 16, 11:59=A0pm, Georg Bauhaus > > > wrote: > > > > > On 4/17/11 8:26 AM, KK6GM wrote: > > > > > > Wow and wow. =A0I've been writing C all my adult life and I didn'= t > > > > > realize this could or would happen. =A0I would have said that the > > > > > unsigned would be promoted to signed. > > > > > > I'm going to include this example in my push to use Ada in our ne= xt > > > > > project. > > > > > Be careful that there are no C savvy people around. > > > > You are demonstrating a lack of understanding of C basics! > > > > ("Stupid!") > > > > That lack is not (in their view, and it's their view that counts) > > > > a good start for asking for a different language. > > > > > Had you read section 2.7 of K&R (or A.6), you'd have expected > > > > the result you got: arithmetic operators will convert their > > > > arguments following the rules of the C language definition. > > > > Yes, I understand how the "stupid" argument works in the C community. > > > I'm going to ask some other programmers tomorrow and see how many of > > > them get this right. =A0I'm guessing our situation will be similar to > > > the situation at the OP's workplace, where presumably competent > > > programmers still got clobbered by this language-legal insanity. > > > Most programmers are competent in their views. Few really are and it > > does not matter what is the actual language. For example, looks like > > you feel you are competent in C, but are you? > > > "I would expect unsigned to int conversion" is just unacceptable! > > Someone has written a line of code without knowing what it does. Is it > > a language problem? Not that C is spectacular, but blaming the > > language here is not fair. Minimally competent C programmers do know > > about such conversions. If you don't you suck as a C programmer. If > > you suck as a C programmer, please do not try to advocate any other > > language over it, this _is_ stupid! > > > Maybe Ada over C is a smart choice, but advocating it without having a > > strong knowledge of both is unacceptable.- Hide quoted text - > > > - Show quoted text - > > Seems that someone never worked on projects of more then few thousand > lines of code, supports multiple hardware platforms and yes after > programming for 30+ years in it can tell C sucks. > > Wonder if sudden acceleration in Toyota cars was not caused by > "intuitive" C typing conversions. Now you're making hypothesis. I don't even know the problem the, less so the language of the code, but rest assured that it was a programmer's fault. Or a compiler bug. One thing that can't be the cause is the language. Maybe lack of knowledge of it, but not the language per se. And nobody said type promotion rules in C are intuitive. They are what they are, they won't change, is it smart to keep complaining instead of go read a book? You say C sucks, ok it is an opinion. I would say someone who doesn't know type promotion rules and considers himself competent in C sucks far more. Elias.