Path: utzoo!mnetor!uunet!wucs1!wucs2!adiron!jdp From: jdp@adiron.UUCP (Powell) Newsgroups: comp.os.vms Subject: Re: Vax C Sucks Wind Message-ID: <374@adiron.UUCP> Date: 24 Feb 88 16:01:14 GMT References: <8802220606.AA16924@ucbvax.Berkeley.EDU> Organization: PAR Technology, New Hartford, NY Lines: 53 Summary: C code is tight in UNIX environments. In article <8802220606.AA16924@ucbvax.Berkeley.EDU>, aharon@WISDOM.BITNET (Aharon Shtull-Trauring) writes: > > We are in the process of porting a very large system from Vax pascal to C, > with the express purpose of being able to run on Apollos and Suns also. > We used a semi-automatic translator and then cleaned up the code to make it > real C. Nonehteless there is a close correlation between the C and Pascal. > Low and behold we noticed that the C objects are between 5 and 10 times larger > than the Pascal objects. Worse yet, what was a 5000 block image (compiled > and linked with debug) under pascal, is now 40000 blocks. After talking > to the Dec support people here in Israel, who turned to the European > support center, we were told that 'C under VMS is not a devlopment language' > (this is a direct, uncensored quote)!!!!!!!!!!!! > ... > Digital Europe claimed (again this is a direct quote) > that all the extra stuff is things the compiler added so that C can > emulate unix!!!!!!!!!!!!!!! Several years ago, I converted approximately 6000 lines of code from PASCAL to C under UNIX (after first getting the PASCAL code to compile and execute properly on UNIX after it was developed on VMS). This experience showed me that relative sizes on one machine do not carry over to other machines (or replace "machine" with operating system). The actual lines of C code in direct translation was greater than the number of lines of PASCAL code on UNIX but the optimized C executable was about 1/2 as large as the optimized PASCAL executable (plus the C code was put into separate files so a one-line change to a function required only a few seconds to recompile and test. The PASCAL was all in one file so a one-line change to that required several minutes to recompile and test. Also under UNIX, the C version (with a few enhancements that should have slowed it down) ran probably about 20% faster than the PASCAL version. I am not trying to start a C vs. PASCAL discussion here, I am just saying that DEC's claim is valid. DEC says that C is not a development language under VMS, I say that PASCAL is not a development language under UNIX. Under UNIX, PASCAL (and FORTRAN) have intermediate libraries that let the language environment be simulated by equivalent UNIX system calls or subroutines so that PASCAL's writeln('Hello world'); is probably ultimately translated into C's fprintf(stdout,"Hello world\n"); by the language's library. If you want to flame DEC, do it for the reason that they don't seem to want to make C a "development language", not because they told you that it's not a development language. At least they were honest. BTW, I do not and never have worked for DEC. I just live in an environment where 4.3BSD, ULTRIX 2.0, SUN's 3.2, and VMS with DCL and DEC-shell are a part of everyday life. Good luck. John D. Powell PAR Technology