From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cebf,55be15e14d3dee4e X-Google-Attributes: gid10cebf,public X-Google-Thread: ffc31,8d2315bbfec7d11 X-Google-Attributes: gidffc31,public X-Google-Thread: 1164f8,769bc7b1925998af X-Google-Attributes: gid1164f8,public X-Google-Thread: fdd80,769bc7b1925998af X-Google-Attributes: gidfdd80,public From: billm@cygnus.com (TTK Ciar) Subject: Re: Y2038 problems (Re: RT-11/TSX-PLUS Year 2000 Compliant Application Programs) Date: 1998/10/19 Message-ID: <70g3ci$qi7$1@andros.cygnus.com>#1/1 X-Deja-AN: 402905703 References: <3613A881.ED0E72FC@idirect.com> <70aoii$ejo$1@info.cs.uofs.edu> <70b49p$plo$1@andros.cygnus.com> <70fb3k$brb$1@info.cs.uofs.edu> Organization: Subtle, but there. Newsgroups: alt.sys.pdp11,comp.sys.dec,comp.sys.dec.micro,vmsnet.pdp-11 In article <70fb3k$brb$1@info.cs.uofs.edu> bill@cs.uofs.edu (Bill Gunshannon) writes: >In article <70b49p$plo$1@andros.cygnus.com>, billm@cygnus.com (TTK Ciar) writes: >|> >|> And I apologize again .. my anger isn't directed at you specifically, >|> it's just a touchy subject in general. Programming language semantics >|> and compiler technology were my joy in school, but much of what we know >|> in theory is unusable in practice because of C's dominance. > >C let's you write bad code, but it doesn't force you to do it. Just as >you can write bad code in Pascal, you can write good code in C. It isn't >the right tool for every job, but then, neither is Pascal, Modula, ADA, >COBOL, Fortran, APL or PL/1. The language isn't source of the problem, it >is the lack of solid background principles that results in the choice of >the wrong tool for the job. I'm not talking about "writing bad code" here. The definition of the language itself puts hard limitations on what the compiler can do to optimize and error-check the code. For instance, in some languages having one parameter alias another is considered a programmer error and the compiler is free to assume that parameters refer to distinct data sets. Not only does C allow for aliasing, but it adopts a model which makes antialiasing particularly difficult (and in some cases theoretically impossible) to implement. This and other deficiencies prevent the compiler from utilizing ILP beyond a certain point and forces it to generate altogether too many load/store operations. C's weak typing etc makes it impossible to catch many errors at compile time, and makes it much harder to catch the classes of errors which can theo- retically be detected at compile time. We all know that the complete solution of detecting all errors at compile- time for a useful imperative language is impossible (it's called the halting problem), but we *can* catch some subset of all errors at compile-time, and the design of the language has great impact on on how large that subset can be. -- TTK