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. Why C++ sucks

Why C++ sucks

Scheduled Pinned Locked Moved The Lounge
c++csharphtmlcomlearning
31 Posts 16 Posters 3 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.
  • V Vikram A Punathambekar

    Jörgen Sigvardsson wrote: I like Lisp I've never done LISP. I'm giving my age away here. Jörgen Sigvardsson wrote: Please do! :zzz: Not a fun thing to do at 1:00 AM. But tell you what- to make up for it, I'll do it tomorrow and notify you personally. :) Jörgen Sigvardsson wrote: It might be an interesting read, given that it's objective and to the point and not full of personal oppinions. You seem to love discussions and POVs and theories. Are you an INTP (like me) ?
    Vikram. ----------------------------- My soon-to-be-updated site KI klike KDE kand kuse kit, kbut KI kmust kadmit, kstarting kall knames kwith K kis ksilly. KI khope kthey kwill kgive kup kthis kwhole kscheme ksoon kand kcome kup kwith kreal knames. pI vThink aHungarian nNotation vIs iA aWonderful nThing cAnd pEveryone avShould vUse pIt aAll dThe nTime, adNo nMatter pWhat dThe nContext, adEven adWhen vSpeaking.

    J Offline
    J Offline
    Jorgen Sigvardsson
    wrote on last edited by
    #10

    Vikram Punathambekar wrote: I've never done LISP. I'm giving my age away here. It's never too late! :-D Vikram Punathambekar wrote: Not a fun thing to do at 1:00 AM. But tell you what- to make up for it, I'll do it tomorrow and notify you personally. Thank you! Vikram Punathambekar wrote: You seem to love discussions and POVs and theories. Are you an INTP (like me) ? Discussing things is good thing. I may learn something by doing it. What is an INTP btw? -- Now we live in a world of uncertainty Fear is the key - to what you want to be You don't get a say, the majority gets it's way You're outnumbered by the bastards till the day you die...

    V 1 Reply Last reply
    0
    • J Jorgen Sigvardsson

      Vikram Punathambekar wrote: I've never done LISP. I'm giving my age away here. It's never too late! :-D Vikram Punathambekar wrote: Not a fun thing to do at 1:00 AM. But tell you what- to make up for it, I'll do it tomorrow and notify you personally. Thank you! Vikram Punathambekar wrote: You seem to love discussions and POVs and theories. Are you an INTP (like me) ? Discussing things is good thing. I may learn something by doing it. What is an INTP btw? -- Now we live in a world of uncertainty Fear is the key - to what you want to be You don't get a say, the majority gets it's way You're outnumbered by the bastards till the day you die...

      V Offline
      V Offline
      Vikram A Punathambekar
      wrote on last edited by
      #11

      Jörgen Sigvardsson wrote: Thank you! My pleasure. Jörgen Sigvardsson wrote: What is an INTP btw? Introverted iNtutive Thinking Perceiving. One of the 16 MBTI classes. Take the test (free) at: http://www.humanmetrics.com/cgi-win/JTypes2.asp Don't forget to tell me what you are! :-D Regards,
      Vikram. ----------------------------- My soon-to-be-updated site KI klike KDE kand kuse kit, kbut KI kmust kadmit, kstarting kall knames kwith K kis ksilly. KI khope kthey kwill kgive kup kthis kwhole kscheme ksoon kand kcome kup kwith kreal knames. pI vThink aHungarian nNotation vIs iA aWonderful nThing cAnd pEveryone avShould vUse pIt aAll dThe nTime, adNo nMatter pWhat dThe nContext, adEven adWhen vSpeaking.

      J 1 Reply Last reply
      0
      • J Joe Woodbury

        While there are valid criticisms to made of C++, as there is of every computer language (and everything else), they can only really be made by someone who actually understands the language and its intent. The author repeatedly demonstrates that he really doesn't know C++ at all. The most obvious error may be his claim that to create a prototype in a header you "...Cut and paste, put an 'extern' at the front of the line...." C++ is complex, in some cases ridiculously so, but that complexity gives incredible control to the developer. (My criticism here isn't really of C++ per se, but that far too many developers use that complexity, when simplicity would suffice.) But the author's most laughable criticism is "C++ requir[es] too much typing." Not only is this bogus, the reverse is true. In my opinion, one of the chief flaws of C++ is that it's not typed strongly enough (a vestige of the "must be compatible with 'C'" mindset.) As way of small illustration, C# arguably treats bool correctly, while C++ does not. While I generally like not having headers with C#, it does have it's problems. Namely, with everything being inline, it's sometimes hard to separate the implementation and interface. And his explanation of virtual functions defies all reason. Yes, there is arguably a design flaw in C++ that allows you to make a mistake in an overridden virtual function, thus not getting a virtual function at all, but to insist that you can only override a virtual function with the same prototype as in the base class, as the author seems to do, would be even worse. (There are times I deliberately declared a virtual function with the same name as in the base class but with a different prototype, though, again, I would like a "ididthisonpurpose" keyword.) Of course, you do have to question the intelligence of someone who claims to hate something, then proceeds to spend an inordinate amount of time obsessing over it. Why not just use something else? It's not like there aren't dozens of computer languages available.

        V Offline
        V Offline
        Vikram A Punathambekar
        wrote on last edited by
        #12

        In all, well said! Specifically, Joe Woodbury wrote: In my opinion, one of the chief flaws of C++ is that it's not typed strongly enough (a vestige of the "must be compatible with 'C'" mindset.) My thoughts exactly. Backward compatibility is a PITA.
        Vikram. ----------------------------- My soon-to-be-updated site KI klike KDE kand kuse kit, kbut KI kmust kadmit, kstarting kall knames kwith K kis ksilly. KI khope kthey kwill kgive kup kthis kwhole kscheme ksoon kand kcome kup kwith kreal knames. pI vThink aHungarian nNotation vIs iA aWonderful nThing cAnd pEveryone avShould vUse pIt aAll dThe nTime, adNo nMatter pWhat dThe nContext, adEven adWhen vSpeaking.

        1 Reply Last reply
        0
        • V Vikram A Punathambekar

          No, it doesn't. IMO, it's the coolest language ever. :cool: But this guy does have a few good points: http://www.nothings.org/computer/cpp.html Come to think of it, C# seems to be better than C++, tho' I'm just learning C#. Sorry if it's a repost.
          Vikram. ----------------------------- My soon-to-be-updated site KI klike KDE kand kuse kit, kbut KI kmust kadmit, kstarting kall knames kwith K kis ksilly. KI khope kthey kwill kgive kup kthis kwhole kscheme ksoon kand kcome kup kwith kreal knames. pI vThink aHungarian nNotation vIs iA aWonderful nThing cAnd pEveryone avShould vUse pIt aAll dThe nTime, adNo nMatter pWhat dThe nContext, adEven adWhen vSpeaking.

          J Offline
          J Offline
          JoeSox
          wrote on last edited by
          #13

          Vikram Punathambekar wrote: C# seems to be better than C++, tho' I'm just learning C#. this is what I have been delaying. I need the time to experiement with C#. How are you finding it to be? Are you spending a lot of time learning? or is it pretty easy for you? Later,
          JoeSox
          www.humanaiproject.org "Dream as if you'll live forever; live as if you'll die tomorrow." - James Dean(ISTP)

          J 1 Reply Last reply
          0
          • V Vikram A Punathambekar

            No, it doesn't. IMO, it's the coolest language ever. :cool: But this guy does have a few good points: http://www.nothings.org/computer/cpp.html Come to think of it, C# seems to be better than C++, tho' I'm just learning C#. Sorry if it's a repost.
            Vikram. ----------------------------- My soon-to-be-updated site KI klike KDE kand kuse kit, kbut KI kmust kadmit, kstarting kall knames kwith K kis ksilly. KI khope kthey kwill kgive kup kthis kwhole kscheme ksoon kand kcome kup kwith kreal knames. pI vThink aHungarian nNotation vIs iA aWonderful nThing cAnd pEveryone avShould vUse pIt aAll dThe nTime, adNo nMatter pWhat dThe nContext, adEven adWhen vSpeaking.

            T Offline
            T Offline
            Tim Smith
            wrote on last edited by
            #14

            Heh, well I agreed with some of his statements, but then he continued on talking. Tim Smith I'm going to patent thought. I have yet to see any prior art.

            1 Reply Last reply
            0
            • V Vikram A Punathambekar

              No, it doesn't. IMO, it's the coolest language ever. :cool: But this guy does have a few good points: http://www.nothings.org/computer/cpp.html Come to think of it, C# seems to be better than C++, tho' I'm just learning C#. Sorry if it's a repost.
              Vikram. ----------------------------- My soon-to-be-updated site KI klike KDE kand kuse kit, kbut KI kmust kadmit, kstarting kall knames kwith K kis ksilly. KI khope kthey kwill kgive kup kthis kwhole kscheme ksoon kand kcome kup kwith kreal knames. pI vThink aHungarian nNotation vIs iA aWonderful nThing cAnd pEveryone avShould vUse pIt aAll dThe nTime, adNo nMatter pWhat dThe nContext, adEven adWhen vSpeaking.

              S Offline
              S Offline
              Stan Shannon
              wrote on last edited by
              #15

              I will agree with him to this extent - most C++ code I have seen in my life should have been written in straight C. From my experience, few programmers know how to take advantage of the additional complexity C++ brings to the table and merely end up writing bizarre C code with classes. That is one reason I've become interested in C#. However, having used it a while, I don't really see that it solves the complexity issue any more than Java did. It just reformats the complexity while giving up much (though certainly not all) of the power of C++. Conceptually, issues such as reflection and attributes are just as easy to get wrong in a design as anything C++ allows. And don't even get me started on garbage collection. What a frigging joke. Give me old fashioned destructors any day for a cleanly designed application! "More capitalism, please..."

              V 1 Reply Last reply
              0
              • J JoeSox

                Vikram Punathambekar wrote: C# seems to be better than C++, tho' I'm just learning C#. this is what I have been delaying. I need the time to experiement with C#. How are you finding it to be? Are you spending a lot of time learning? or is it pretty easy for you? Later,
                JoeSox
                www.humanaiproject.org "Dream as if you'll live forever; live as if you'll die tomorrow." - James Dean(ISTP)

                J Offline
                J Offline
                J Dunlap
                wrote on last edited by
                #16

                The language itself is not at all hard to learn if you know C++. The syntax is of course very similar, all though there are a bunch of small differences in the way some everyday things are done, for instance, an array is declared bool[] foo; instead of bool foo[]. But then the whole new .NET way of doing things is a fairly steep climb, but it's IMO much better than the old way. The BCL is so big that it takes a while to learn, but it acually saves you time because you have all kinds of wrapper classes that you would otherwise have to write yourself, right at your fingertips.

                "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
                "You must be the change you wish to see in the world." - Mahatma Gandhi

                J 1 Reply Last reply
                0
                • V Vikram A Punathambekar

                  Jörgen Sigvardsson wrote: Thank you! My pleasure. Jörgen Sigvardsson wrote: What is an INTP btw? Introverted iNtutive Thinking Perceiving. One of the 16 MBTI classes. Take the test (free) at: http://www.humanmetrics.com/cgi-win/JTypes2.asp Don't forget to tell me what you are! :-D Regards,
                  Vikram. ----------------------------- My soon-to-be-updated site KI klike KDE kand kuse kit, kbut KI kmust kadmit, kstarting kall knames kwith K kis ksilly. KI khope kthey kwill kgive kup kthis kwhole kscheme ksoon kand kcome kup kwith kreal knames. pI vThink aHungarian nNotation vIs iA aWonderful nThing cAnd pEveryone avShould vUse pIt aAll dThe nTime, adNo nMatter pWhat dThe nContext, adEven adWhen vSpeaking.

                  J Offline
                  J Offline
                  Jorgen Sigvardsson
                  wrote on last edited by
                  #17

                  ESTP Extroverted Sensing Thinking Perceiving :) -- Now we live in a world of uncertainty Fear is the key - to what you want to be You don't get a say, the majority gets it's way You're outnumbered by the bastards till the day you die...

                  1 Reply Last reply
                  0
                  • J J Dunlap

                    The language itself is not at all hard to learn if you know C++. The syntax is of course very similar, all though there are a bunch of small differences in the way some everyday things are done, for instance, an array is declared bool[] foo; instead of bool foo[]. But then the whole new .NET way of doing things is a fairly steep climb, but it's IMO much better than the old way. The BCL is so big that it takes a while to learn, but it acually saves you time because you have all kinds of wrapper classes that you would otherwise have to write yourself, right at your fingertips.

                    "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
                    "You must be the change you wish to see in the world." - Mahatma Gandhi

                    J Offline
                    J Offline
                    JoeSox
                    wrote on last edited by
                    #18

                    jdunlap wrote: The BCL is so big that it takes a while to learn, but it acually saves you time because you have all kinds of wrapper classes that you would otherwise have to write yourself, right at your fingertips. yes, I am interested in this part. also I have tried VS .NET and decided to stick with VSC6.0 but now tinkering with this AI stuff I need to spead the time and learn, no way around it. Later,
                    JoeSox
                    www.humanaiproject.org "Dream as if you'll live forever; live as if you'll die tomorrow." - James Dean(ISTP)

                    1 Reply Last reply
                    0
                    • J Jorgen Sigvardsson

                      Vikram Punathambekar wrote: who argued very well as to what is/was wrong with C++. That paper is bigger than this. I assume it's a well written paper..? Of course, there are deficiencies in C++. Bjarne & co knows this. I think that's the reason why they are working on a new revision of C++. But I still think it's the best language for real world applications right now. I like Lisp and it's dialects better than C++ from a pure language point of view. However, how much support is there for creating seamless applications in those languages? How much support and documentation is there? Vikram Punathambekar wrote: If I can find the link... Please do! It might be an interesting read, given that it's objective and to the point and not full of personal oppinions. :) -- Now we live in a world of uncertainty Fear is the key - to what you want to be You don't get a say, the majority gets it's way You're outnumbered by the bastards till the day you die...

                      J Offline
                      J Offline
                      Jamie Hale
                      wrote on last edited by
                      #19

                      Jörgen Sigvardsson wrote: I like Lisp ... How much support and documentation is there? I think you'd be surprised. :) The Association Of Lisp Users[^] Tools and libraries[^] Companies that use Lisp[^] Implementations (free and commercial)[^] J

                      "You can get anything you want at Alice's Restaurant."

                      J 1 Reply Last reply
                      0
                      • V Vikram A Punathambekar

                        No, it doesn't. IMO, it's the coolest language ever. :cool: But this guy does have a few good points: http://www.nothings.org/computer/cpp.html Come to think of it, C# seems to be better than C++, tho' I'm just learning C#. Sorry if it's a repost.
                        Vikram. ----------------------------- My soon-to-be-updated site KI klike KDE kand kuse kit, kbut KI kmust kadmit, kstarting kall knames kwith K kis ksilly. KI khope kthey kwill kgive kup kthis kwhole kscheme ksoon kand kcome kup kwith kreal knames. pI vThink aHungarian nNotation vIs iA aWonderful nThing cAnd pEveryone avShould vUse pIt aAll dThe nTime, adNo nMatter pWhat dThe nContext, adEven adWhen vSpeaking.

                        P Offline
                        P Offline
                        peterchen
                        wrote on last edited by
                        #20

                        His points aren#t that great.


                        "Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
                        sighist | Agile Programming | doxygen

                        1 Reply Last reply
                        0
                        • J Jamie Hale

                          Jörgen Sigvardsson wrote: I like Lisp ... How much support and documentation is there? I think you'd be surprised. :) The Association Of Lisp Users[^] Tools and libraries[^] Companies that use Lisp[^] Implementations (free and commercial)[^] J

                          "You can get anything you want at Alice's Restaurant."

                          J Offline
                          J Offline
                          Jorgen Sigvardsson
                          wrote on last edited by
                          #21

                          I know.. but compare with C++. How many Lisp articles can you find on CP? :) -- Now we live in a world of uncertainty Fear is the key - to what you want to be You don't get a say, the majority gets it's way You're outnumbered by the bastards till the day you die...

                          1 Reply Last reply
                          0
                          • N Navin

                            That's kind of what I got from it. He has some good arguments, but I disagree with most of them. The one good point he does make is that the whole header file /CPP file split-up is quite a nuisance. C# actually gets this part right - no header files necessary. :) But the problem with most of his arguments is that C++ programmers, in general, prefer having power and flexibilty to having safety nets. "When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity." - Albert Einstein

                            R Offline
                            R Offline
                            Ryan Binns
                            wrote on last edited by
                            #22

                            Navin wrote: The one good point he does make is that the whole header file /CPP file split-up is quite a nuisance. I actually disagree. I can't think of anything worse than checking on the declaration of a function (for argument types etc.) and having to scroll through an entire source file to find it. Header files with just the declaration make it much shorter and easier. Ryan Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
                            Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"

                            1 Reply Last reply
                            0
                            • J Jorgen Sigvardsson

                              Navin wrote: The one good point he does make is that the whole header file /CPP file split-up is quite a nuisance. C# actually gets this part right - no header files necessary. I actually find this good as it separates the interface from the implementation. I wish there was some way to move the private data and methods into the implementation file though. Yes, I know you can do it by using the "pimpl" idiom, but I'd like to see language support for it. Navin wrote: But the problem with most of his arguments is that C++ programmers, in general, prefer having power and flexibilty to having safety nets. All he seems to be upset with is the syntax. Syntax which he doesn't really know. He states in the article: Something like that--I'm not very familiar with C++ operator overloading. That single line decimated his credibility :) Something like that - my ass! I bet he loves Perl. -- Now we live in a world of uncertainty Fear is the key - to what you want to be You don't get a say, the majority gets it's way You're outnumbered by the bastards till the day you die...

                              M Offline
                              M Offline
                              Marc Clifton
                              wrote on last edited by
                              #23

                              Jörgen Sigvardsson wrote: I actually find this good as it separates the interface from the implementation. I agree. I find it so incredibly annoying that in C# the definition (or interface, as you put it) and the implementation are so intwined. I can't get a good overview of the class when methods go on and on and on for pages. Regions suck, in my opinion. I spend more time fousing around (hey, a word for pseudodictionary.com) with opening and closing regions--they just get in the way. I end up writing everything as an interface just to avoid implementation! (just kidding.) :-D Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
                              Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
                              Every line of code is a liability - Taka Muraoka
                              Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"

                              J R 2 Replies Last reply
                              0
                              • M Marc Clifton

                                Jörgen Sigvardsson wrote: I actually find this good as it separates the interface from the implementation. I agree. I find it so incredibly annoying that in C# the definition (or interface, as you put it) and the implementation are so intwined. I can't get a good overview of the class when methods go on and on and on for pages. Regions suck, in my opinion. I spend more time fousing around (hey, a word for pseudodictionary.com) with opening and closing regions--they just get in the way. I end up writing everything as an interface just to avoid implementation! (just kidding.) :-D Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
                                Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
                                Every line of code is a liability - Taka Muraoka
                                Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"

                                J Offline
                                J Offline
                                J Dunlap
                                wrote on last edited by
                                #24

                                Marc Clifton wrote: I find it so incredibly annoying that in C# the definition (or interface, as you put it) and the implementation are so intwined. I can't get a good overview of the class when methods go on and on and on for pages. I find it kind of annoying, too, but I generally use the Class Scout to get an overview - and it works quite well. :)

                                "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
                                "You must be the change you wish to see in the world." - Mahatma Gandhi

                                1 Reply Last reply
                                0
                                • N Navin

                                  That's kind of what I got from it. He has some good arguments, but I disagree with most of them. The one good point he does make is that the whole header file /CPP file split-up is quite a nuisance. C# actually gets this part right - no header files necessary. :) But the problem with most of his arguments is that C++ programmers, in general, prefer having power and flexibilty to having safety nets. "When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity." - Albert Einstein

                                  R Offline
                                  R Offline
                                  ROK_RShadow
                                  wrote on last edited by
                                  #25

                                  the whole header file /CPP file split-up is fundamental to OOD. One of the main objectives (other than reusability) of OOD is to separate the data from the interface; with C++ this is both physical (the file splits) and implemented (the class). The fact that C# doesn't support this (and in doing so saying.. eh.. to hell with OOD, lets go back to spaghetti) is just another reason why C# (and Java for that matter .. what real purpose does it serve) should be destroyed, and never mentioned again.

                                  R 1 Reply Last reply
                                  0
                                  • M Marc Clifton

                                    Jörgen Sigvardsson wrote: I actually find this good as it separates the interface from the implementation. I agree. I find it so incredibly annoying that in C# the definition (or interface, as you put it) and the implementation are so intwined. I can't get a good overview of the class when methods go on and on and on for pages. Regions suck, in my opinion. I spend more time fousing around (hey, a word for pseudodictionary.com) with opening and closing regions--they just get in the way. I end up writing everything as an interface just to avoid implementation! (just kidding.) :-D Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
                                    Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
                                    Every line of code is a liability - Taka Muraoka
                                    Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"

                                    R Offline
                                    R Offline
                                    Rocky Moore
                                    wrote on last edited by
                                    #26

                                    Marc Clifton wrote: I can't get a good overview of the class when methods go on and on and on for pages. If they run on and on an on, then maybe it is time for a little refactoring ;) Marc Clifton wrote: I can't get a good overview of the class when methods go on and on and on for pages. Regions suck, in my opinion. I love regions and was hoping they would do something like that for the HTML editor so I can collapse everything between matchings tags. Maybe you just have not got the hang of them. When I first started with C# I was glad to see the header go. Could not stand them, always trying to figure out which one to use and in what order. Don't forget the times you include one header for COM and it blows your code with redefinitions. Not to mention the versioning problems! Then the sad news came to light, I still have to select my libraries with "Using" unless I want to always specify the full path so I am not completely out of the woods. There have been several times I have pulled a little code from the usenet where the Using lines were not included and it contains a class or two that I have not used before and have to dig out the library to which they belong. Not a big problem (a lot better than the header mess from the past). It would be great to have it notice when a class is not known and automatically parse the .NET libraries and any custom ones I have built looking for the correct match and automatically generate them or in some method allow me to override if I wish but not require my input by default! Rocky Moore <><

                                    1 Reply Last reply
                                    0
                                    • R ROK_RShadow

                                      the whole header file /CPP file split-up is fundamental to OOD. One of the main objectives (other than reusability) of OOD is to separate the data from the interface; with C++ this is both physical (the file splits) and implemented (the class). The fact that C# doesn't support this (and in doing so saying.. eh.. to hell with OOD, lets go back to spaghetti) is just another reason why C# (and Java for that matter .. what real purpose does it serve) should be destroyed, and never mentioned again.

                                      R Offline
                                      R Offline
                                      Roger Wright
                                      wrote on last edited by
                                      #27

                                      ROK_RShadow wrote: the whole header file /CPP file split-up is fundamental to OOD A very good point. Exposing only the declarations is fundamental to OOP; the user should not be bothered by the details in the implementation. Maintaining separate files is a PITA, though...

                                      "The Lion shall lie down with the Lamb;
                                      but the Lamb will not get much sleep..."
                                      Lazarus Long

                                      1 Reply Last reply
                                      0
                                      • S Stan Shannon

                                        I will agree with him to this extent - most C++ code I have seen in my life should have been written in straight C. From my experience, few programmers know how to take advantage of the additional complexity C++ brings to the table and merely end up writing bizarre C code with classes. That is one reason I've become interested in C#. However, having used it a while, I don't really see that it solves the complexity issue any more than Java did. It just reformats the complexity while giving up much (though certainly not all) of the power of C++. Conceptually, issues such as reflection and attributes are just as easy to get wrong in a design as anything C++ allows. And don't even get me started on garbage collection. What a frigging joke. Give me old fashioned destructors any day for a cleanly designed application! "More capitalism, please..."

                                        V Offline
                                        V Offline
                                        Vikram A Punathambekar
                                        wrote on last edited by
                                        #28

                                        Excellent, Stan! Esp the garbage collection stuff.
                                        Vikram. ----------------------------- My soon-to-be-updated site KI klike KDE kand kuse kit, kbut KI kmust kadmit, kstarting kall knames kwith K kis ksilly. KI khope kthey kwill kgive kup kthis kwhole kscheme ksoon kand kcome kup kwith kreal knames. pI vThink aHungarian nNotation vIs iA aWonderful nThing cAnd pEveryone avShould vUse pIt aAll dThe nTime, adNo nMatter pWhat dThe nContext, adEven adWhen vSpeaking.

                                        1 Reply Last reply
                                        0
                                        • J Jorgen Sigvardsson

                                          Navin wrote: The one good point he does make is that the whole header file /CPP file split-up is quite a nuisance. C# actually gets this part right - no header files necessary. I actually find this good as it separates the interface from the implementation. I wish there was some way to move the private data and methods into the implementation file though. Yes, I know you can do it by using the "pimpl" idiom, but I'd like to see language support for it. Navin wrote: But the problem with most of his arguments is that C++ programmers, in general, prefer having power and flexibilty to having safety nets. All he seems to be upset with is the syntax. Syntax which he doesn't really know. He states in the article: Something like that--I'm not very familiar with C++ operator overloading. That single line decimated his credibility :) Something like that - my ass! I bet he loves Perl. -- Now we live in a world of uncertainty Fear is the key - to what you want to be You don't get a say, the majority gets it's way You're outnumbered by the bastards till the day you die...

                                          J Offline
                                          J Offline
                                          John M Drescher
                                          wrote on last edited by
                                          #29

                                          Jörgen Sigvardsson wrote: I actually find this good as it separates the interface from the implementation. Yes. I myself would rarely implement a c++ function in the class definition. If I want it inline I will define it outside the class definition. I do this because it is much harder to read the interface when the 10 pages of implementation are interspersed. Jörgen Sigvardsson wrote: "pimpl" idiom What is that? John

                                          J 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