From: ARNE@KOPC.HHS.DK (Arne Vajhxj)
Newsgroups: comp.os.vms
Subject: Re: VAX c
Date: 8 Jan 93 10:51:33 GMT
Distribution: world
Organization: The Internet

> >Gawd, how I *HATE* UNIX!
> 
> But you use C?
> 
> This discussion just reinforces my belief that C is an unacceptable language
> because the run time library has to emulate unix, regardless of the OS. I
> have seen C take over as 'this weeks language' and I just don't understand it.
> Why in hell are so many people using C on VMS? Why would you want to hose your
> performance running through 14 levels of emulation attempting to (and often
> failing) make the rtl conform to every little idiosyncrasy of one particular
> system? I mean, is it a management decree based on 'marketing related
> concerns'? Is it for 'portability' (seems like the typical C program depends on
> such exact unix behavior that this portability is just a myth touted by people
> running unix. Christ, look at the contortions the guy who ported XV had to go
> through)?

There are some good reasons for using C:

  - It is often the only compiler available at all platforms in a mixed
    environment (f.ex. VMS-machines with FORTRAN,PASCAL and C + UNIX-machines
    with C + DOS-machines with PASCAL and C).
  - The number of extensions to the language available on the different
    platforms are relative low (compared with f.ex. VAX PASCAL and TURBO
    PASCAL) making the code relative easily to port.
  - The language has builtin possibilities for conditional compiling on
    different platforms (#IFDEF's), which makes source-code maintaining
    on different platforms easier.
  - The language itself is good at low-level programming.
  - A lot of things (f.ex. X11) are designed for use in C.
  - Some special utilities (YACC,LEX) are availble for C but not for
    other languages.

Also there are some problems using C:

  - Some of the RTL-functions are implemented poorly with respect to
    performance.
  - There has been more bugs in VAXCRTL than in most other RTL.
  - C code can get very ugly indeed.
  - C and VMS are not always so compatible in basic structures
    (ex.: C-string versus VMS descriptors).

And now for the big point (also called "Arnes rule about compilers"):

  There is NO best compiler. There are best compilers for a given
  programming-problem.

If you are programming X11-applications,TCP/IP-applications,compilers
or system-programming (and assembler is out of the question), then C
is a good choice !

If you are programming numerical-applications, then you will probaly
prefer FORTRAN.

If you are programming accounting-systems, then you may prefer COBOL.

Etc. etc. etc. ...

Compiler languages tend to have some religious overtones, because we
all have some personal preferences due to the fact, that we all do
different kind of programming (and what I think is very important: we
learned the languages at different times in our careers - and we
probably all love our FIRST language most !).

OK ?

                                                          Arne

Arne Vajhxj                             local DECNET:  KO::ARNE
Computer Department                     PSI:           PSI%23831001304030::ARNE
Business School of Southern Denmark     Internet:      ARNE@KO.HHS.DK


Newsgroups: comp.os.vms