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 From: schwarza@gdls.com (Art Schwarz) Subject: Re: What's the best language to start with? [was: Re: Should I learn C or Pascal?] Date: 1996/09/30 Message-ID: <52ofv0$din@mill.gdls.com>#1/1 X-Deja-AN: 186221403 references: <01bbac7f$23e42940$87ee6fce@timpent.a-sis.com> organization: General Dynamics, Land Systems Div reply-to: schwarza@gdls.com newsgroups: comp.lang.c,comp.lang.c++,comp.unix.programmer,comp.lang.ada Date: 1996-09-30T00:00:00+00:00 List-Id: (I hate to enter the fray.) During the time of initial construction of the C compilers, not much was available with respect to optimization. The nearest that I remember, there was peephole optimization (McKeeman, Wortman, et alia) and various articles by (for example) Cocke, a (rather good) book by Schwartz and little else. The seminal article by Knuth (Software Practices and Experiences, Vol. 1, Issue 1 - I believe) on his observation of typical Fortran expression usage and the first article on sourcle level optimization (Software Practices and Experiences, Vol ?) had yet to be written. I can't speak for any of the developers, however, given the state of the art in compiling at that time, it does not appear to be far-fetched to consider the various 'condensed' operators to be a cheap way of doing optimization. An aid to the compiler given the state of the compiling art at that time. On the other hand, there are probably any number of people who were initially on the C project who could answer the why's and wherefor's. Maybe one of them could be asked to contribute. art schwarz (My opinions are someone else's.) In article <01bbac7f$23e42940$87ee6fce@timpent.a-sis.com>, "Tim Behrendsen" writes: >Jay Martin wrote in article <52g7f6$1fv0@uni.library.ucla.edu>... >> jsa@alexandria (Jon S Anthony) writes: >> >> >In article bs@research.att.com (Bjarne Stroustrup) >writes: >> >> >> Actually, the story that ++ comes from the PDP11 instruction >> >> set is a myth. Dennis Ritchie has denied it quite often, but >> >> that doesn't seem to impress people. ++ is in C and C++ because >> >> Dennis (being a mathematician) considered it a fundamental >> > ^^^^^^^^^^^^^^^^^^^^^ >> >> (and useful) operation. It was in the PDP11 instruction set >> >> >I don't see how that has anything to do with it. I'm a mathematician >> >and I don't see it as a particularly interesting or useful operation >> >to be singled out for special status (I'm not talking about the machine >> >level here...) >> >> I don't see any mathematical justification for it either, maybe Mr >> Richie should publish a paper on the fundamental nature of "++" to the >> foundations of mathematical thought. It seems incredible to me that Mr >> Ritchie had never seen an "increment" assembly instruction or that the >> inclusion of 10+ REDUNDANT and side-effect producing operators was not >> motivated by some low-level performance concern/"too lazy to write an >> optimizing compiler" or an anti-software engineering desire to >> minimize keystrokes on some primitive input device. If he did think >> he was doing mathematics, then I would say that he is an even poorer >> mathematician than he is a language designer. > >I don't know about mathematical thought, but if you find it >difficult to imagine why increment and decrement are useful, >perhaps you need to practice a bit more programming before making >criticisms. > >-- Tim Behrendsen (tim@a-sis.com)