??? 10/24/08 15:31 Read: times Msg Score: +2 +1 Informative +1 Good Answer/Helpful |
#159306 - A bit too simplistic analysis Responding to: ???'s previous message |
There should not need to be any significant difference in code compactnes (or speed) between C and Pascal programs. The Pascal code may be a bit "wordier", but that should not really matter for the code optimizer. The big factor in code size is how much money/time the developer may spend on the optimization steps (and the regression testing of the quickly increasing rule base).
I can't say that I have met many C programmers who considers C cryptic. With C programmers, I mean people who really do spend significant time developing C code. A programming language is a programming language, just as a natural language is a natural language. When you become familiar enough, you don't spend any time thinking about the language, but about the actual program you are solving. I have seen a very large number of Pascal programmers move to C, but hardly any C programmer move to Pascal. Not just because people didn't take the jump from Turbo Pascal/Borland Pascal to Delphi, but because C has a (at least in my view) fuller mapping onto the hardware. The problem with the original Pascal language was that it was so very limited - it was defined for educational use, without any support for accessing hardware. It could hardly do any file accesses. C on the other hand was developed intentionally for solving real programs and for systems programming. The goal was not to educate people, but to produce a working tool set and environment as needed for all the problems a big company may need to solve. Turbo Pascal managed to overcome a number of limitations of the Pascal language, making the language "commercial grade". But you still only have a subset of C. Language limitations makes some fancy stuff impossible to do without workarounds. And the total code base available is so very much smaller. If your rewritten C program lead to a significant "simplicity" in the Pascal version, then I'm afraid that the C program was probably not written by someone really fluent in the language. A simple problem should lead to a simple implementation in almost any general-purpose language. If not, then the language is not general-purpose. Play games faster? Most games at that time was MUD-class games, where the speed of the serially connected terminal was the main speed factor. I don't think Kernighan or Ritchie bothered too much about speed of games when they worked with C. Programming languages are basically religion. I really do not think that people switch languages as "sheep" - it normally takes quite a lot for most people to jump to a new language. But the "sheep" metaphor may be applicable to the universities. They have always been quite quick at moving to new langauges - even when the new languages have still been totally unusable for real-world problems. For example: A huge number of universities quickly moved to Java, long before there even was a standard for how to print. |