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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,baaf5f793d03d420 X-Google-Attributes: gid109fba,public X-Google-Thread: fc89c,97188312486d4578 X-Google-Attributes: gidfc89c,public X-Google-Thread: 1014db,6154de2e240de72a X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,97188312486d4578 X-Google-Attributes: gid103376,public X-Google-Thread: 10db24,4cf070091283b555 X-Google-Attributes: gid10db24,public From: seebs@solutions.solon.com (Peter Seebach) Subject: Re: What's the best language to learn? [was Re: Should I learn C or Pascal?] Date: 1996/08/17 Message-ID: <4v5aji$qmo@solutions.solon.com>#1/1 X-Deja-AN: 174782581 references: <4u7hi6$s2b@nntp.seflin.lib.fl.us> <01bb8c6d$c62d44c0$87ee6fce@timpent.airshields.com> organization: Usenet Fact Police (Undercover) reply-to: seebs@solon.com newsgroups: comp.edu,comp.lang.ada,comp.lang.c,comp.lang.c++,comp.unix.programmer Date: 1996-08-17T00:00:00+00:00 List-Id: In article <01bb8c6d$c62d44c0$87ee6fce@timpent.airshields.com>, Tim Behrendsen wrote: >Well, what sense does that make? C is not instantly readable to >someone who only knows Fortran. If you don't know the language, >then it's not going to be instantly readable. I object to this. I found C instantly readable. When I was a kid, I had the source (in C) to a game called hack. I had never even heard of C; I didn't know what it was, I just knew that it supposedly was "the source" to hack. (My understanding of source had to do with an unnamed language in which every statement had a number, and there were 52 variables, half of which were strings, and half of which were numbers.) But when I wanted to know how the game worked, I paged through printouts. Nothing hard about it. What's tricky (to someone who knows that "HP: 12/12" means you have 12 out of a possible 12 "hit points") about u.hp = u.maxhp = 12; ? >It's extremely rare that hand coded assembly is slower than >compiler output. Depends. Recently, I saw someone looking for a good way to speed something up. The C version he ended up using (admittedly, non-portable C) was actually about 2 instructions *faster* than a previous hand-tuned assembly implementation. Sure, he could have done it in assembly, too, but it would have been exactly the same code. However, I suspect that the realization that led to the improvement would have been less obvious in assembly. >Compilers are *extremely* stupid; anyone who >thinks otherwise has either 1) not coded in assembly, and 2) not >viewed the assembly output from compilers. They are certainly >less stupid than they used to be, but to imagine that on the >average they beat even the average human assembly programmer is >just nonsense. I don't know that much about assembly programmers, but assuming that the average assembly programmer has a level of skill at least comprable to the average human C programmer, I'd expect a pretty pathetic compiler to beat the assembly programmer about half the time. Most programmers of any language appear to be dodgy at best. -s -- Peter Seebach - seebs@solon.com - Copyright 1996 - http://www.solon.com/~seebs Unix/C Wizard - send mail for help, or send money for consulting! The *other* C FAQ, the hacker FAQ, et al. See web page above. Unsolicited email (junk mail and ads) is unwelcome, and will be billed for.