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!cu4g2000vbb.googlegroups.com!not-for-mail From: "George P." Newsgroups: comp.lang.ada Subject: Re: Fun with C Date: Mon, 18 Apr 2011 18:22:09 -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> <08279ed8-61de-414e-a53c-996bc0ae2ba9@f31g2000pri.googlegroups.com> 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 1303176130 10487 127.0.0.1 (19 Apr 2011 01:22:10 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 19 Apr 2011 01:22:10 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: cu4g2000vbb.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:19852 Date: 2011-04-18T18:22:09-07:00 List-Id: On Apr 18, 3:24=A0pm, Elias Salom=E3o Helou Neto wrote: > 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 did= n't > > > > > > realize this could or would happen. =A0I would have said that t= he > > > > > > 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 communit= y. > > > > I'm going to ask some other programmers tomorrow and see how many o= f > > > > 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 i= t > > > 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.- Hide quoted text - > > - Show quoted text - Oh really? So C is the language of cyborgs that never have bad days, never argue with their girlfriends and never go late night drinking? And sure none of such people should be allowed to design embedded systems :-)