Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. C is better !!!!

C is better !!!!

Scheduled Pinned Locked Moved The Lounge
csharpc++hardware
56 Posts 28 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Nemanja Trifunovic

    None of the abovementioned languages (C, C++, C#, VB) are very good, IMHO, but C++ is among other things a better C. Not much better C, granted, but still better.

    utf8-cpp

    K Offline
    K Offline
    Kevin McFarlane
    wrote on last edited by
    #26

    Nemanja Trifunovic wrote:

    None of the abovementioned languages (C, C++, C#, VB) are very good

    So what's your definition of a very good language then? I thought you were a C++ worshipper?

    Kevin

    R N 2 Replies Last reply
    0
    • K Kevin McFarlane

      Nemanja Trifunovic wrote:

      None of the abovementioned languages (C, C++, C#, VB) are very good

      So what's your definition of a very good language then? I thought you were a C++ worshipper?

      Kevin

      R Offline
      R Offline
      Rama Krishna Vavilala
      wrote on last edited by
      #27

      Probably he is an F# lover now.

      N 1 Reply Last reply
      0
      • K Kevin McFarlane

        Nemanja Trifunovic wrote:

        None of the abovementioned languages (C, C++, C#, VB) are very good

        So what's your definition of a very good language then? I thought you were a C++ worshipper?

        Kevin

        N Offline
        N Offline
        Nemanja Trifunovic
        wrote on last edited by
        #28

        Kevin McFarlane wrote:

        I thought you were a C++ worshipper?

        Wow! I don't worship programming languages. C++ lets me do my job, but I wouldn't call it a good language: first of all it is build on foundation of a really bad language (C) and it really can't go too far in fixing its flaws without breaking the compatibility. It is hard to learn, full of surprises, and the syntax is so complex that it is very hard to make good tools.

        Kevin McFarlane wrote:

        So what's your definition of a very good language then?

        Don't know the definition, but some of the languages I like (low-level to high-level) are: Ada, Modula-2, OCaml/F#, Haskell, Dylan, Scheme. Mind you, I've never done anything serious with any of them, and I wouldn't pick any of them for any serious project. If a job needs to be done I always end up with ugly languages: C++, Perl, JavaScript, C#, VBA.

        utf8-cpp

        K R 2 Replies Last reply
        0
        • R Rama Krishna Vavilala

          Probably he is an F# lover now.

          N Offline
          N Offline
          Nemanja Trifunovic
          wrote on last edited by
          #29

          Rama Krishna Vavilala wrote:

          he is an F# lover now

          :) I like F#, but wouldn't really bet any money on it's success.

          utf8-cpp

          K 1 Reply Last reply
          0
          • B Behzad Sedighzadeh

            Can you please tell me some of holes? I have done embedded coding in C and C++. In C you can use files in which source codes can act as classes and you can write application and do not use OOP features. Once upon a time, i heard from a guy " C++ is C with another syntax!".At the time,for the desktop i was using C# and for a embedded application C++. Now Iam using C in linux and altough IDEs are not as good as VS, i think that guy's opnoin was correct.I love coding in C which i think simplifies thinking; All in all There are some rules you must obey, no matter you use OOP or structured programming, etc.

            Behzad

            N Offline
            N Offline
            Nemanja Trifunovic
            wrote on last edited by
            #30

            Behzad Sedighzadeh wrote:

            Can you please tell me some of holes?

            One that really bothers me is implicit casting of pointers to void*

            utf8-cpp

            1 Reply Last reply
            0
            • N Nemanja Trifunovic

              Kevin McFarlane wrote:

              I thought you were a C++ worshipper?

              Wow! I don't worship programming languages. C++ lets me do my job, but I wouldn't call it a good language: first of all it is build on foundation of a really bad language (C) and it really can't go too far in fixing its flaws without breaking the compatibility. It is hard to learn, full of surprises, and the syntax is so complex that it is very hard to make good tools.

              Kevin McFarlane wrote:

              So what's your definition of a very good language then?

              Don't know the definition, but some of the languages I like (low-level to high-level) are: Ada, Modula-2, OCaml/F#, Haskell, Dylan, Scheme. Mind you, I've never done anything serious with any of them, and I wouldn't pick any of them for any serious project. If a job needs to be done I always end up with ugly languages: C++, Perl, JavaScript, C#, VBA.

              utf8-cpp

              K Offline
              K Offline
              Kevin McFarlane
              wrote on last edited by
              #31

              Nemanja Trifunovic wrote:

              first of all it is build on foundation of a really bad language (C) and it really can't go too far in fixing its flaws without breaking the compatibility. It is hard to learn, full of surprises, and the syntax is so complex that it is very hard to make good tools.

              Have you read Ian Joyner's C++ Critique 3rd Edition[^]? It's rather old now (1996) but worth a skim.

              Nemanja Trifunovic wrote:

              If a job needs to be done I always end up with ugly languages: C++, Perl, JavaScript, C#, VBA

              The only one I really hate in that list is Perl. My first experience of it was having to maintain the code of a developer who had left. I would always leave for home at the end of the day in a foul mood. It was quite common to identify a bug, know algorithmically how to fix it but then struggle with the actual Perl implementation! :mad: I'm not especially fond of JavaScript. I like C#. Of the languages I've actually used to at least "Hello World" level the one I've liked most is Eiffel (for which Ada is one influence). I've played with F# a little but find it quite tough. It's not as accessible as Scala. It might just be a superficial syntax thing, and I've not tried either seriously, so maybe Scala becomes equally scary once you get into realistic usages.

              Kevin

              N 1 Reply Last reply
              0
              • N Nemanja Trifunovic

                Rama Krishna Vavilala wrote:

                he is an F# lover now

                :) I like F#, but wouldn't really bet any money on it's success.

                utf8-cpp

                K Offline
                K Offline
                Kevin McFarlane
                wrote on last edited by
                #32

                Nemanja Trifunovic wrote:

                I like F#, but wouldn't really bet any money on it's success

                It will probably be picked up by the investment bankers at least. I have a friend at Barclays Capital who managed to get Don Syme in for a talk.

                Kevin

                1 Reply Last reply
                0
                • J Jim Crafton

                  harold aptroot wrote:

                  who needs inheritance when you have copy and paste?

                  That's sig material!!! :) In fact, I'm pretty sure that's the title for an article, if not a book :)

                  ¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #33

                  Its also a quote from me. Let me remind the person that plagarism deserves and original source quote.

                  Morality is indistinguishable from social proscription

                  U 1 Reply Last reply
                  0
                  • L Lost User

                    I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste?

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #34

                    harold aptroot wrote:

                    who needs inheritance when you have copy and paste?

                    If you are going to steal my quotes at least have the decency to attribute the m to me. ;P

                    Morality is indistinguishable from social proscription

                    L 1 Reply Last reply
                    0
                    • B Behzad Sedighzadeh

                      I have written applications in C/C++ for embedded and C#/VB for enterprises.When it comes to choosing between C and C++ for an application i always go to C, no matter how much much much features C++ has

                      Behzad

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #35

                      Horses for courses. I use a lot of both. STL is very usefull, MFC a godsend, and direct memory referencing in C very powerfull. I am not such a fan of virtual classes, so called reference variables (its just a damn pointer OK!), but function overriding can be usefull if used wisely.

                      Morality is indistinguishable from social proscription

                      1 Reply Last reply
                      0
                      • L Lost User

                        harold aptroot wrote:

                        who needs inheritance when you have copy and paste?

                        If you are going to steal my quotes at least have the decency to attribute the m to me. ;P

                        Morality is indistinguishable from social proscription

                        L Offline
                        L Offline
                        Lost User
                        wrote on last edited by
                        #36

                        Sorry :) Epic quote though

                        1 Reply Last reply
                        0
                        • T TheGreatAndPowerfulOz

                          Well, you could use the C++ compiler as a better "C" (i.e. only use the "C" features). That fixes many of the holes of "C". I'm interested to understand your reasons for excluding "C++" from consideration though.

                          Fight Big Government:
                          http://obamacareclassaction.com/
                          http://obamacaretruth.org/

                          R Offline
                          R Offline
                          Rob12345654321
                          wrote on last edited by
                          #37

                          C is limited in its support for complexity management in my opinion. For a very large project, C++ provides the kind of OO facilities necessary to make the project understandable at any level of abstraction.

                          Fight Big Government!! Big Business Needs Less Competition And Is Not Capable Of Constituting An Oligarchy!

                          1 Reply Last reply
                          0
                          • K Kevin McFarlane

                            Nemanja Trifunovic wrote:

                            first of all it is build on foundation of a really bad language (C) and it really can't go too far in fixing its flaws without breaking the compatibility. It is hard to learn, full of surprises, and the syntax is so complex that it is very hard to make good tools.

                            Have you read Ian Joyner's C++ Critique 3rd Edition[^]? It's rather old now (1996) but worth a skim.

                            Nemanja Trifunovic wrote:

                            If a job needs to be done I always end up with ugly languages: C++, Perl, JavaScript, C#, VBA

                            The only one I really hate in that list is Perl. My first experience of it was having to maintain the code of a developer who had left. I would always leave for home at the end of the day in a foul mood. It was quite common to identify a bug, know algorithmically how to fix it but then struggle with the actual Perl implementation! :mad: I'm not especially fond of JavaScript. I like C#. Of the languages I've actually used to at least "Hello World" level the one I've liked most is Eiffel (for which Ada is one influence). I've played with F# a little but find it quite tough. It's not as accessible as Scala. It might just be a superficial syntax thing, and I've not tried either seriously, so maybe Scala becomes equally scary once you get into realistic usages.

                            Kevin

                            N Offline
                            N Offline
                            Nemanja Trifunovic
                            wrote on last edited by
                            #38

                            Kevin McFarlane wrote:

                            Have you read Ian Joyner's C++ Critique 3rd Edition[^]? It's rather old now (1996) but worth a skim.

                            Yep - that's one of the best texts on the topic (much better than the popular "FQA"). However, I still disagree with many of the points he makes - he is comparing C++ with high-level OO languages like Java and Eiffel, but that's not where it belongs; pretty much the only real competition to C++ today is (unfortunatelly) C. At the time this text was written, Ada was still a major player so maybe it would have been better to compare C++ with Ada.

                            utf8-cpp

                            1 Reply Last reply
                            0
                            • L Lost User

                              I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste?

                              C Offline
                              C Offline
                              chiwheels
                              wrote on last edited by
                              #39

                              Why talk about the OO advantages and so on with respect to languages; OO is a methodology not a language. You can write NON-OO (random function) programs with C++ just as much as you can write OO programs including full inheritance (single and multiple) using C (with not overwhelmingly more effort). The main reason for using C++ over C for OO programs is that your OO structures are syntactically checked by the compiler whereas they are not for C and, of course, you have the battle hardened STL library to use. I've only used C recently once, for a DSP project, where the C++ compiler turned out to be useless.

                              L 1 Reply Last reply
                              0
                              • C chiwheels

                                Why talk about the OO advantages and so on with respect to languages; OO is a methodology not a language. You can write NON-OO (random function) programs with C++ just as much as you can write OO programs including full inheritance (single and multiple) using C (with not overwhelmingly more effort). The main reason for using C++ over C for OO programs is that your OO structures are syntactically checked by the compiler whereas they are not for C and, of course, you have the battle hardened STL library to use. I've only used C recently once, for a DSP project, where the C++ compiler turned out to be useless.

                                L Offline
                                L Offline
                                Lost User
                                wrote on last edited by
                                #40

                                Yea I know but it's just a quote..

                                1 Reply Last reply
                                0
                                • L Lost User

                                  I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste?

                                  P Offline
                                  P Offline
                                  parkzone
                                  wrote on last edited by
                                  #41

                                  If you are writing code, there is no difference between copy paste and inheritance. If that code has to be maintained then there is a huge difference. It is n times worse where n equals the number of copy pastes. That assumes you know where all of the instances are. Single source is always better.

                                  L 1 Reply Last reply
                                  0
                                  • P parkzone

                                    If you are writing code, there is no difference between copy paste and inheritance. If that code has to be maintained then there is a huge difference. It is n times worse where n equals the number of copy pastes. That assumes you know where all of the instances are. Single source is always better.

                                    L Offline
                                    L Offline
                                    Lost User
                                    wrote on last edited by
                                    #42

                                    I know - this was just a quote. And see the joke icon.

                                    1 Reply Last reply
                                    0
                                    • L Lost User

                                      Its also a quote from me. Let me remind the person that plagarism deserves and original source quote.

                                      Morality is indistinguishable from social proscription

                                      U Offline
                                      U Offline
                                      uvatbc
                                      wrote on last edited by
                                      #43

                                      I love where this is going. Let me summarize: Copy paste must be cited with sources, whereas inheritance is in itself a citation of the original source. Plagiarism at its best! Love the irony! ;P

                                      1 Reply Last reply
                                      0
                                      • B Behzad Sedighzadeh

                                        I have written applications in C/C++ for embedded and C#/VB for enterprises.When it comes to choosing between C and C++ for an application i always go to C, no matter how much much much features C++ has

                                        Behzad

                                        S Offline
                                        S Offline
                                        Stephen Hewitt
                                        wrote on last edited by
                                        #44

                                        Why not be a real man and use machine code?

                                        Steve

                                        1 Reply Last reply
                                        0
                                        • B Behzad Sedighzadeh

                                          Can you please tell me some of holes? I have done embedded coding in C and C++. In C you can use files in which source codes can act as classes and you can write application and do not use OOP features. Once upon a time, i heard from a guy " C++ is C with another syntax!".At the time,for the desktop i was using C# and for a embedded application C++. Now Iam using C in linux and altough IDEs are not as good as VS, i think that guy's opnoin was correct.I love coding in C which i think simplifies thinking; All in all There are some rules you must obey, no matter you use OOP or structured programming, etc.

                                          Behzad

                                          K Offline
                                          K Offline
                                          kgrunwald
                                          wrote on last edited by
                                          #45

                                          It depends on the compiler. Most compilers on embedded system don't have good warnings in C++, so you are on your own anyway. You need good optimization on embedded systems, since poorely optimized C++ tends to eat up all the space you have. The STL is useful some times, but if it comes to predictable timing, you cannot rely on it. So using C for embedded projects looks not that bad.

                                          G 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups