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!l2g2000prg.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: Sun, 17 Apr 2011 12:35:21 -0700 (PDT) Organization: http://groups.google.com Message-ID: 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: 186.223.216.44 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1303068922 14822 127.0.0.1 (17 Apr 2011 19:35:22 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 17 Apr 2011 19:35:22 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l2g2000prg.googlegroups.com; posting-host=186.223.216.44; 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:19810 Date: 2011-04-17T12:35:21-07:00 List-Id: 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 next > > > 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.