fouts@AMES-NAS.ARPA (09/15/86)
Hi, I'm the original author of the 'Pascal is more restrictive than C' comment, and I would like to reply to your response to my comment. The standard definition of a high level language is that it is one in which a single source statement typically translates into multiple assembly statements, as opposed to a low level language in which the translation is usually one to one. By this definition, C is a high level language. If you chose to be more pendantic, you can claim that the level of a language is dependent on its degree of data abstraction and strong typing, in which case neither C nor Pascal qualify as high level, since Ada has a considerably higher level of abstraction and typing than either language. Also, C is very similar to Pascal in its ability to handle data abstraction, having all of the facilities Pascal has, except for the set data type, which is replaced by the ability to perform seperate compilation. Further, C does have strong type checking, but it is voluntary (through the use of Lint,) rather than mandatory. Also, it is relitively straightforward, although painful, to avoid strong type checking in pascal by using variant record types. It just makes for cumbersome code. Also, correct use of C produces more portable code, since there are far more dialects of Pascal then there are of C. (Although the people producing microcomputer C compilers are trying to remedy this :-) As to your comment about speed of debugging, I would disagree for empirical reasons. I have been using Pascal since I ported the ETH compiler to RSTS/E on an 11/70 nearly a decade ago, and have used it for some fairly large applications, including an APL interpretter, a Pascal compiler, and a Chess program, as well as the required language in the compiler and operating system courses I have taken, and the language of choice on both of my own personal computers. On the other hand, I have been using C since I ported 6th edition Unix to an 11/23 at about the same time, and have used it for some fairly sophisticated applications, including C compilers, graphics packages, performance measurement and network software on computers ranging from 68000 machines to Cray 2 supercomputers. And, (to make the picture even more complex) I have been using Fortran since 1973, when I first learned it on an IBM 1620, and have used it in various engineering applications ranging to a mine design package which runs on large CDC systems. It has been my experience with these (and other) languages, that the amount of time required to debug a problem in a real system is relitively independent of the source language, but highly dependent on the support environment. That is, C with a good debugger is easier to debug than Pascal with no more than compiler diagnostics. Modula-2's disadvantage is that it is far too sophisticated to use on many small problems. Using M2 to write a typical unix filter is a lot like trying to whittle with a machete - the amount of work you do is far greater than what you would have had to with a carving knife. As long as you are bringing new languages into the picture, why don't you program in COBOL? (:-) It is certainly high level, it has data abstraction, and it has strong typing that is even more difficult to subvert than Pascal's. Chosing the 'one right' language is a religious decision; most people being brought up to believe in the first one they learned or its more popular successors. I have been fortunate enough to have been forced to use a large number of languages, and am truely agnostic in this area. If I want to do a toy expert system, I use LISP. If I were going to write a real one, I would use one of the expert system writing languages. There are a whole family of related languages for things like algebraic manipulation and symbolic calculation. If I want to do almost anything on a Unix system, I do it in C, since C is well supported and integrated in most Unix environments. If I want to do fast vector calculations on a supercomputer, I will use Fortran, or if it's not fast enough, the machine's assembly language (and get help from local experts in tuning the code.) If I had to do a payroll on an IBM system, I would do it in COBOL. If I had to manage a very large project (more than 1 million lines of code) and there was a good implementation available, I would try Modula 2, unless it was for the department of defense and ADA was available. If I want to program my MS-DOS pc, I use Turbo Pascal, because it is reasonably good, and very cheap. If I want to program my Atari ST, I also use Pascal, for the same reason. However, Pascal will fall on both of these systems, because I will eventually have to buy a C compiler to support all of the public domain software I can obtain in C for each system. Marty ----------
K538915@CZHRZU1A.BITNET (09/23/86)
Hi Marty, thanks for your response to my C-flaming. You are quite correct in saying : on machine X to do job Y I use language Z, where Z is hopefully the best langauge for the job. I agree with practically all your statements, BUT WE WERE DISCUSSING LANGUAGES FOR THE ST and NOT which language I would use on a PDP-11,IBM 30XX, Cray, CDC, VAX, uVAX, Pro-380, Apple, ZX80, QL, IBM-PC ....................................... > Further, C does have strong type checking, but it is voluntary > (through the use of Lint,) rather than mandatory. This is the standard answer of every C-programmer, the problem is: nobody I know has a Lint for the ST. > ...That is, C with a good debugger is easier to debug than Pascal with no > more than compiler diagnostics. Which good debugger on the ST? C probaly is the best language in a UNIX environment, but we don't have UNIX on the ST (yet?). Simon Poole K538915@CZHRZU1A.BITNET