Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
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.

List of 70 messages in thread
TopicAuthorDate
C vs Pascal            01/01/70 00:00      
   A long time ago, in a Galaxy far, far away...            01/01/70 00:00      
      Choice ?            01/01/70 00:00      
   Chalk and Cheese            01/01/70 00:00      
      A bit too simplistic analysis            01/01/70 00:00      
         Bondage and discipline            01/01/70 00:00      
            Yes, you can            01/01/70 00:00      
               ?            01/01/70 00:00      
                  Thinking hard about writing code is essential            01/01/70 00:00      
                  blame users, not tools            01/01/70 00:00      
                     Real Programmers            01/01/70 00:00      
                        It\'s back to planning and documentation again            01/01/70 00:00      
         readibility            01/01/70 00:00      
            I have and do            01/01/70 00:00      
               I fully agree            01/01/70 00:00      
               C *is* cryptic by design            01/01/70 00:00      
                  You say cryptic, I say terse            01/01/70 00:00      
                     and what is the purpose...            01/01/70 00:00      
                        terseness/ clatity            01/01/70 00:00      
                           any language depends on naming            01/01/70 00:00      
                              i do not            01/01/70 00:00      
                                 Why not, if appropriate?            01/01/70 00:00      
                                    one-char index isn't a problem            01/01/70 00:00      
                           never say never to have a multiline C construct            01/01/70 00:00      
                              multi-line conditional            01/01/70 00:00      
                  still just symbols            01/01/70 00:00      
                  No one says you have to use every short cut in C            01/01/70 00:00      
                     it's not the shortcuts...            01/01/70 00:00      
                        whatever it is            01/01/70 00:00      
                           Just a minute ...            01/01/70 00:00      
                              C can thrill you            01/01/70 00:00      
                  Not the point            01/01/70 00:00      
            free choice            01/01/70 00:00      
               commercial?            01/01/70 00:00      
                  yes, commercial            01/01/70 00:00      
                     I did never question...            01/01/70 00:00      
                        choices are good            01/01/70 00:00      
                           yeah, yeah            01/01/70 00:00      
                              ADD 1 TO COBOL            01/01/70 00:00      
                                 On Languages            01/01/70 00:00      
                                    braces            01/01/70 00:00      
                                       I like the literal BEGIN and END much better!            01/01/70 00:00      
                                          Perhaps            01/01/70 00:00      
                                             That\'s not what I meant ...            01/01/70 00:00      
                                                There I disagree            01/01/70 00:00      
                                                   words vs symbols - maybe solution for Richard            01/01/70 00:00      
                                                   Humans have to understand it, too            01/01/70 00:00      
                                                Games are for kidz            01/01/70 00:00      
                                                   headstart            01/01/70 00:00      
                                                      still comparing grass straws            01/01/70 00:00      
                                                         you said it            01/01/70 00:00      
                                                            but you did not get it            01/01/70 00:00      
                                                               good joke            01/01/70 00:00      
                                                                  yet more extrapolations/flame baits            01/01/70 00:00      
                                          BEGIN and END            01/01/70 00:00      
                                             No .. I probably should have listened to Mom ...            01/01/70 00:00      
                                    Pascal            01/01/70 00:00      
      More than a language            01/01/70 00:00      
         some of this is language independent            01/01/70 00:00      
            I love standards            01/01/70 00:00      
               Igor recognizes this...            01/01/70 00:00      
         Answers applicable to Turbo51            01/01/70 00:00      
            don't call it IDE...            01/01/70 00:00      
               IDE vs editor            01/01/70 00:00      
                  DIY or gdb or?            01/01/70 00:00      
                     GDB?            01/01/70 00:00      
                     8051 IDE            01/01/70 00:00      
                        this one?            01/01/70 00:00      
   On T51            01/01/70 00:00      
      Some cooments            01/01/70 00:00      

Back to Subject List