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.
  • J Jim Crafton

    Well he mentions embedded systems, and I've heard horror stories about how bad some of the compilers are in terms of supporting C++, so it might just be less hassle dealing with C. Occasionally I do some OpenVMS development and it's always in C. I'd rather do C++, but the compiler is so slow that it's not worth the hassle.

    ¡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

    P Offline
    P Offline
    PIEBALDconsult
    wrote on last edited by
    #16

    I've never done C++ on OpenVMS; only C -- Whitesmith's C, VAX C, DEC C, Compaq C (?), HP C. The hobbyist license and media seem to include it, but I haven't installed it.

    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

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #17

      I've only dabbled in C++; I've had no need for its "features". In my opinion, object-oriented languages are like big trucks, boats, and planes -- when you need them, you need them. But you don't need them if you're just going to the local pub. I don't like having to use objects and namespaces just to write "Hello world!" in C#. X| "Use the right tool for the right job." -- Scotty, et al

      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

        D Offline
        D Offline
        dighn
        wrote on last edited by
        #18

        C is the way to go for embedded for many reasons. 90+% of the code I write is C but I'm not a big fan of it. Expressing higher level constructs and concepts like classes and polymorphism is extremely verbose in C.

        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/

          B Offline
          B Offline
          Behzad Sedighzadeh
          wrote on last edited by
          #19

          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

          T K N K S 5 Replies 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

            P Offline
            P Offline
            Pete OHanlon
            wrote on last edited by
            #20

            B will fight you. He thinks he's better because he's one letter higher up in the alphabet.

            "WPF has many lovers. It's a veritable porn star!" - Josh Smith

            As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

            My blog | My articles | MoXAML PowerToys | Onyx

            A 1 Reply Last reply
            0
            • P Pete OHanlon

              B will fight you. He thinks he's better because he's one letter higher up in the alphabet.

              "WPF has many lovers. It's a veritable porn star!" - Josh Smith

              As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

              My blog | My articles | MoXAML PowerToys | Onyx

              A Offline
              A Offline
              AspDotNetDev
              wrote on last edited by
              #21

              Speaking of alphabetic superiority. :rolleyes:

              [Forum Guidelines]

              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

                J Offline
                J Offline
                Jeremy Falcon
                wrote on last edited by
                #22

                C is my favorite programming language in existence - bar none. However, there are plenty of times I'd choose C++ over C. I wouldn't want to write a n-tier business app in C for instance.

                Jeremy Falcon

                G 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

                  T Offline
                  T Offline
                  TheGreatAndPowerfulOz
                  wrote on last edited by
                  #23

                  Behzad Sedighzadeh wrote:

                  some of holes?

                  well, some of this was fixed by the C99 spec. 0. default function return value of "int" if not specified. Is "void" in C++/C99 1. better type safty.

                  for instance: formal function declaration needs type spec
                  int myfunc(a, b, c) is disallowed
                  must be:
                  int myfunc(int a, int b, int c);

                  2. use of "const" instead of MACROs 3. standardized handling of arrays .vs. pointers 4. standardized pointer arithmetic. 5. more/better standard libraries. things like that.

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

                  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
                    Kevin McFarlane
                    wrote on last edited by
                    #24

                    Behzad Sedighzadeh wrote:

                    you can write application and do not use OOP features

                    C++ is technically a multi-paradigm language, you're not obliged to use OO. There are advantages to using procedural C++ - better abstraction and type safety and also STL.

                    Behzad Sedighzadeh wrote:

                    I love coding in C which i think simplifies thinking

                    I don't do either C or C++ these days but I much prefer C++.

                    Kevin

                    1 Reply Last reply
                    0
                    • T TheGreatAndPowerfulOz

                      harold aptroot wrote:

                      copy and paste

                      LOL. Yeah sometimes that is the correct answer, but sometimes you're using a third-party library so you don't have possibility to copy and paste. Or were you being facetious and ironic?

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

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

                      ahmed zahmed wrote:

                      Yeah sometimes that is the correct answer

                      Well, when you first learn programming don't you effectively start off with copying and pasting, :) e.g., copy an example from a book or other source and then play with it to see what's going on.

                      Kevin

                      1 Reply Last reply
                      0
                      • 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
                                          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