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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID 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: 103376,97188312486d4578 X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,6154de2e240de72a X-Google-Attributes: gid1014db,public From: Dan.Pop@cern.ch (Dan Pop) Subject: Re: What's the best language to start with? [was: Re: Should I learn C or Pascal?] Date: 1996/08/07 Message-ID: #1/1 X-Deja-AN: 172767375 sender: news@news.cern.ch (USENET News System) x-nntp-posting-host: ues5.cern.ch references: <31FBC584.4188@ivic.qc.ca> <01bb8342$88cc6f40$32ee6fcf@timhome2> <4u7grn$eb0@news1.mnsinc.com> <01bb83ad$29c3cfa0$87ee6fce@timpent.airshields.com> <4u89c4$p7p@solutions.solon.com> <01bb83f5$923391e0$87ee6fce@timpent.airshields.com> organization: CERN European Lab for Particle Physics newsgroups: comp.lang.c,comp.lang.c++,comp.unix.programmer,comp.lang.ada Date: 1996-08-07T00:00:00+00:00 List-Id: In <01bb83f5$923391e0$87ee6fce@timpent.airshields.com> "Tim Behrendsen" writes: >The problem is that we *can't* think purely abstractly, >otherwise we end up with slow crap code. Care to provide some concrete examples? >It is simply not >possible to ignore the way code is structured, and completely >depend on the compiler to save us. This doesn't make any sense to me. Could you be a little bit more explicit? The compiler definitely won't save my ass if I choose to use bubblesort instead of quicksort on a large dataset, but the selection between the two algorithms is made based on an abstraction (algorithm analysis) not on how the compiler generates code for one or another. It's very likely that quicksort will be better, no matter the compiler and the underlying platform. Once you put micro-optimizations based on knowledge about the compiler and/or hardware into the code, you impair both the readability/maintainability/portability of the code and the opportunities of another compiler, on another platform, to generate optimal code. There are situations when this _has_ to be done, but they are isolated exceptions, not the norm. Dan -- Dan Pop CERN, CN Division Email: Dan.Pop@cern.ch Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland