Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!corton!imag!gourdol From: gourdol@imag.imag.fr (Gourdol Arnaud) Newsgroups: comp.sys.mac.programmer Subject: Re: Pascal deficiency? Message-ID: <16650@imag.imag.fr> Date: 18 Dec 90 20:50:37 GMT References: Reply-To: gourdol@imag.fr (Gourdol Arnaud) Organization: IMAG Institute, University of Grenoble, France Lines: 32 LSP and LSC are both not very good compilers, I mean for the code the build being not "good" code. BTW MPW C3.0 is not a good compiler either. I had the chance to write a compiler and so have been involved in comparing different compilers performance, bot on the Mac and on Sun. Sun C compiler IS very good. There are many levels of optimisation (4 in fact) which can be actived with -O1 to -O4. With -O4 if you write a program like : main() { int i,j; i = 0; j = 1; i = j++ + 1; }; the compiler will produce... nothing. (Hey ! this code does nothing, does it ?) Writing optimisation for Pascal IS more difficult than for C, in the sens that in C, when we use the ++ operator you say to the compiler "Hey, stupid, don't forget to use the INC operator that exist in assembly language!" When you do i := i + 1; in Pascal, the compiler must detect that it can (and should) use the inc operator. Much more difficult when the expression is a bit complicated (like a[i]). There is still no good compiler on the Mac (except GCC maybe ?) either in C or Pascal. (Of course, LSP and LSC are REAL love for programming and debugging as compared to cc, dbx and adb on Sun !!!) Arnaud.