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 I like C++

Why I like C++

Scheduled Pinned Locked Moved The Lounge
csharpc++comquestion
55 Posts 23 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.
  • M Martin Cheng

    I attempt to live C++ actually. I use to be in C programming. There was nothing about objection, overload etc. Now I do work in C++, during for 4 months I can used to program with it. Can somebody give some advises how to learn C++ or how can I get much progress ASAP ? Thanks

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

    Martin.Cheng wrote:

    Can somebody give some advises how to learn C++

    Five steps: 1) Learn C, especially how to write functions. A C++ object's methods work very much like C functions. You will be able to use your experience with C here. 2) Learn about object orientation by understanding the concept. The way the concepts are implemented in C++ (or any other language) are secondary at the moment. Begin with understanding what an object actually is: A data structure with attached functions to allow safe manipulation of the data inside that structure. 3) Learn the difference between a class (the definition) and objects (individual instances of a class). That will lead you to learning about the basic lifecycle of an object. Allocation of memory and automatic execution of the constructor when you create a new object with 'new', and automatic execution of the destructor and freeing memory when you destroy an object with 'delete'. Despite their somewhat scary names, constructors and destructors are just functions which are called automatically when you create or destroy objects. It's very important that you learn to use them to initialize or clean up an object. 4) Learn to use encapsulation to divide up the internal state of an object and its external interface. Other objects can only access methods or member variables of an object which you have declared as 'public'. They get no access to the members you declare to be 'private'. This way you can limit how the object's state is altered from the outside and keep it valid at all times. Limitations and restrictions may sound like a bad thing, but in reality they are your best friend. 5) Learn how to use inheritance and how to design class hierarchies. It's a powerful instrument for writing type safe code and avoiding redundancy. It is also an instrument you have to learn to play well, because it can also quickly lead to bad design. Speaking of bad design: C++ allows classes and functions to be 'friends' of other classes. That actually means breaking the encapsulation. Like feeling the need to use 'goto', it's a sign that you should rethink your design.

    J M K 3 Replies Last reply
    0
    • L Lost User

      I have been turning away from .Net lately and looking for alternatives. I don't want to have to rewrite everything when a certain company heads into a different direction once more. My answer is C++. I always liked its flexibility to allow you to do very low level programming just as well as very high level programming. And today I stumbled over this video[^], in which Bjarne Stroustrup answers two simple questions. Now I know why I like C++ so much. Thanks, Bjarne.

      F Offline
      F Offline
      Fran Porretto
      wrote on last edited by
      #14

      I like C++ because "you get what you pay for:" the "expensive" features of the language cost you nothing, in memory or execution time, until you elect to use them. Inasmuch as my domain is real-time in resource-poor environments, that's a major consideration.

      I also like C++ because the third-party class libraries I use are all available in source code, which simplifies debugging and performance monitoring. Though each of them includes an option to build and deploy it as a DLL, I've never been tempted.

      Finally, I like C++ because it's non-proprietary: Microsoft can't wrench its specification out from under us without incurring a reaction that the company can't afford. That's all the reason I need for preferring C++ to the "incredibly more powerful and convenient" C# / .NET combination, a trap far too many software engineers have failed to appreciate.

      (This message is programming you in ways you cannot detect. Be afraid.)

      L 1 Reply Last reply
      0
      • L Lost User

        That's not limited to C++. I have encountered four different types, what architecture and class design are concerned: 1) Archi... what? (perfect chaos) 2) Get the job done and worry about future problems when they arise. 3) Must use every pattern in the book at least once in every project. And at least one or two of my own. 4) Software as a religion, with the one and only way to do things. All others lead straight to hell. (Strict order, but absolutely helpless when something happens that is not dealt with in their particular bible) How do you want it?

        S Offline
        S Offline
        Stefan_Lang
        wrote on last edited by
        #15

        You forget the Frankenstein-architecture: Sewn together roughly from bits of old legacy stuff, third party libs, and later add-ons, but hopelessly inadequate to fulfill the role it was intendended for, yet too expensive or difficult to be done all over again.

        1 Reply Last reply
        0
        • L Lost User

          I have been turning away from .Net lately and looking for alternatives. I don't want to have to rewrite everything when a certain company heads into a different direction once more. My answer is C++. I always liked its flexibility to allow you to do very low level programming just as well as very high level programming. And today I stumbled over this video[^], in which Bjarne Stroustrup answers two simple questions. Now I know why I like C++ so much. Thanks, Bjarne.

          K Offline
          K Offline
          Kimberley Barrass
          wrote on last edited by
          #16

          I earn my money, or rather used to before becoming management, in Java/.Net/custom script toolsets for bespoke hardware and a little C occasionally, but despite never having touched it professionally, I find it the best language to satisfy my need as a programmer to learn, study and understand computing, and I find it fortifies my knowledge when dealing with all other areas of computing. I find it encourages polyglotism, as an anchor into C functions as well as all OOP languages (in one form or another). I also find that the literature (particularly historic) is more scientific, and less "wishy-washy" than other languages, and I prefer to learn in this manner. None of this, java in 21 days, rubbish, but academicly useful books at a time when the OOP paradigm was being invented as a useful and functioning mechanism for complex solutions (And along with the seminal C book, the best language reference book). Partly because of that, C++ is the best way (IMO) to learn frameworks, client-server, windows (and the not-windows full-screen shenanigans of today) managers, resource-sharing, memory management issues, and so, so much more. I would, and do, recommend that everyone learns C++ (And high and low level OOAD as a parellel task) even if they don't intend to use it in their day to day activity.

          1 Reply Last reply
          0
          • F Fran Porretto

            I like C++ because "you get what you pay for:" the "expensive" features of the language cost you nothing, in memory or execution time, until you elect to use them. Inasmuch as my domain is real-time in resource-poor environments, that's a major consideration.

            I also like C++ because the third-party class libraries I use are all available in source code, which simplifies debugging and performance monitoring. Though each of them includes an option to build and deploy it as a DLL, I've never been tempted.

            Finally, I like C++ because it's non-proprietary: Microsoft can't wrench its specification out from under us without incurring a reaction that the company can't afford. That's all the reason I need for preferring C++ to the "incredibly more powerful and convenient" C# / .NET combination, a trap far too many software engineers have failed to appreciate.

            (This message is programming you in ways you cannot detect. Be afraid.)

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

            Fran Porretto wrote:

            That's all the reason I need for preferring C++ to the "incredibly more powerful and convenient" C# / .NET combination, a trap far too many software engineers have failed to appreciate.

            Exactly. Basic lifecycle management of a C++ object is not so much different from that of a managed object, especially if you implement and use IDisposable. A garbage collection certainly does not help me very much and its absence would be no obstacle for me. And I still admire the 'productivity' of certain (Java) developers who helplessly tried to tweak the garbage collector's configuration for months when they had a memory leak. Anyway, I would love to reuse my code for once, instead of constantly struggling to keep up with Microsoft's constant changes. Using languages and libraries that are not under the control of a single company looks like the right way.

            1 Reply Last reply
            0
            • L Lost User

              I have been turning away from .Net lately and looking for alternatives. I don't want to have to rewrite everything when a certain company heads into a different direction once more. My answer is C++. I always liked its flexibility to allow you to do very low level programming just as well as very high level programming. And today I stumbled over this video[^], in which Bjarne Stroustrup answers two simple questions. Now I know why I like C++ so much. Thanks, Bjarne.

              S Offline
              S Offline
              Stavros Bizelis
              wrote on last edited by
              #18

              I LIKE C++... :-D :-D :-D i like the fact thats it is a programming language that doesn't wish to be you mommy. What i mean by this is that c++ lets you do things your way... I am not a rule breaker in coding but i want that freedom to sometimes dirty patch something. Modern languages tend to give you "the way" to write code their way(no use of pointers, garbage collection etc)... the only thing that makes you write code in a certain way in c++ is to get better results and this is what makes the difference between programmers and users... a programmer knows why he does what he does... a user lets the "program/language" to tell him what to do and just obeys... AND in case you are a "create empty project" programmer c++ is just the thing ...

              1 Reply Last reply
              0
              • S shiprat

                C++ is just a language lol, that's funny, I though it was THE language. what is .NET written in btw?

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

                I remember a programming language on the Atari ST that was written as an interpreter. The compiler was later written in that languages and the first thing it compiled was itself :)

                1 Reply Last reply
                0
                • L Lost User

                  Martin.Cheng wrote:

                  Can somebody give some advises how to learn C++

                  Five steps: 1) Learn C, especially how to write functions. A C++ object's methods work very much like C functions. You will be able to use your experience with C here. 2) Learn about object orientation by understanding the concept. The way the concepts are implemented in C++ (or any other language) are secondary at the moment. Begin with understanding what an object actually is: A data structure with attached functions to allow safe manipulation of the data inside that structure. 3) Learn the difference between a class (the definition) and objects (individual instances of a class). That will lead you to learning about the basic lifecycle of an object. Allocation of memory and automatic execution of the constructor when you create a new object with 'new', and automatic execution of the destructor and freeing memory when you destroy an object with 'delete'. Despite their somewhat scary names, constructors and destructors are just functions which are called automatically when you create or destroy objects. It's very important that you learn to use them to initialize or clean up an object. 4) Learn to use encapsulation to divide up the internal state of an object and its external interface. Other objects can only access methods or member variables of an object which you have declared as 'public'. They get no access to the members you declare to be 'private'. This way you can limit how the object's state is altered from the outside and keep it valid at all times. Limitations and restrictions may sound like a bad thing, but in reality they are your best friend. 5) Learn how to use inheritance and how to design class hierarchies. It's a powerful instrument for writing type safe code and avoiding redundancy. It is also an instrument you have to learn to play well, because it can also quickly lead to bad design. Speaking of bad design: C++ allows classes and functions to be 'friends' of other classes. That actually means breaking the encapsulation. Like feeling the need to use 'goto', it's a sign that you should rethink your design.

                  J Offline
                  J Offline
                  John Atten
                  wrote on last edited by
                  #20

                  Excellent advice for learning any programming language!

                  1 Reply Last reply
                  0
                  • L Lost User

                    Martin.Cheng wrote:

                    Can somebody give some advises how to learn C++

                    Five steps: 1) Learn C, especially how to write functions. A C++ object's methods work very much like C functions. You will be able to use your experience with C here. 2) Learn about object orientation by understanding the concept. The way the concepts are implemented in C++ (or any other language) are secondary at the moment. Begin with understanding what an object actually is: A data structure with attached functions to allow safe manipulation of the data inside that structure. 3) Learn the difference between a class (the definition) and objects (individual instances of a class). That will lead you to learning about the basic lifecycle of an object. Allocation of memory and automatic execution of the constructor when you create a new object with 'new', and automatic execution of the destructor and freeing memory when you destroy an object with 'delete'. Despite their somewhat scary names, constructors and destructors are just functions which are called automatically when you create or destroy objects. It's very important that you learn to use them to initialize or clean up an object. 4) Learn to use encapsulation to divide up the internal state of an object and its external interface. Other objects can only access methods or member variables of an object which you have declared as 'public'. They get no access to the members you declare to be 'private'. This way you can limit how the object's state is altered from the outside and keep it valid at all times. Limitations and restrictions may sound like a bad thing, but in reality they are your best friend. 5) Learn how to use inheritance and how to design class hierarchies. It's a powerful instrument for writing type safe code and avoiding redundancy. It is also an instrument you have to learn to play well, because it can also quickly lead to bad design. Speaking of bad design: C++ allows classes and functions to be 'friends' of other classes. That actually means breaking the encapsulation. Like feeling the need to use 'goto', it's a sign that you should rethink your design.

                    M Offline
                    M Offline
                    Martin Cheng
                    wrote on last edited by
                    #21

                    Oh, It's unbelievable that there are responses for my questions! Thanks for the suggestions, really! Actually, I have got the concepts things about C++, like objects, hierarchies things. I guess I am lack of some projects experiences. Even I got the concepts about it, I have no idea how to use them in programming. It might be the more practices make it perfect. I have to spend much time on it and use C++ times and times. Anyway, thanks a lot! Buy the way, I red effective C++ recently. It talks about STL and boost things. I almost program with BOOST and STL library every day. They are important for the C++, aren't they ?

                    S J F L M 5 Replies Last reply
                    0
                    • P Paul Michalik

                      You may or may not like C++. But you can't just "turn away from .NET to C++". This is like you said "I am turning away from gasoline, since I do not want to depend on all of that oil stuff...". C++ is just a language, .NET is a eco-system of many languages, infrastructure, libraries, tools etc. If you rely on that, the language itself does not matter, but the presence of this infrastructure does.

                      S Offline
                      S Offline
                      sasadler
                      wrote on last edited by
                      #22

                      Heh, luckily I'm a firmware developer so .NET infrastructure isn't involved. :)

                      1 Reply Last reply
                      0
                      • L Lost User

                        I have been turning away from .Net lately and looking for alternatives. I don't want to have to rewrite everything when a certain company heads into a different direction once more. My answer is C++. I always liked its flexibility to allow you to do very low level programming just as well as very high level programming. And today I stumbled over this video[^], in which Bjarne Stroustrup answers two simple questions. Now I know why I like C++ so much. Thanks, Bjarne.

                        F Offline
                        F Offline
                        Fabio Franco
                        wrote on last edited by
                        #23

                        I like C++ because it's challenging, powerful, flexible and allows me to get closer to the hardware and yet it still allows me to write elegant code. C++ is like a crude tool that allows the artist to create a master piece.

                        To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson ---- Our heads are round so our thoughts can change direction - Francis Picabia

                        1 Reply Last reply
                        0
                        • L Lost User

                          Martin.Cheng wrote:

                          Can somebody give some advises how to learn C++

                          Five steps: 1) Learn C, especially how to write functions. A C++ object's methods work very much like C functions. You will be able to use your experience with C here. 2) Learn about object orientation by understanding the concept. The way the concepts are implemented in C++ (or any other language) are secondary at the moment. Begin with understanding what an object actually is: A data structure with attached functions to allow safe manipulation of the data inside that structure. 3) Learn the difference between a class (the definition) and objects (individual instances of a class). That will lead you to learning about the basic lifecycle of an object. Allocation of memory and automatic execution of the constructor when you create a new object with 'new', and automatic execution of the destructor and freeing memory when you destroy an object with 'delete'. Despite their somewhat scary names, constructors and destructors are just functions which are called automatically when you create or destroy objects. It's very important that you learn to use them to initialize or clean up an object. 4) Learn to use encapsulation to divide up the internal state of an object and its external interface. Other objects can only access methods or member variables of an object which you have declared as 'public'. They get no access to the members you declare to be 'private'. This way you can limit how the object's state is altered from the outside and keep it valid at all times. Limitations and restrictions may sound like a bad thing, but in reality they are your best friend. 5) Learn how to use inheritance and how to design class hierarchies. It's a powerful instrument for writing type safe code and avoiding redundancy. It is also an instrument you have to learn to play well, because it can also quickly lead to bad design. Speaking of bad design: C++ allows classes and functions to be 'friends' of other classes. That actually means breaking the encapsulation. Like feeling the need to use 'goto', it's a sign that you should rethink your design.

                          K Offline
                          K Offline
                          Kimberley Barrass
                          wrote on last edited by
                          #24

                          For Martin Cheng: I would like to add that Points 2,3,4,5 are very, very important if you really want to get the most out of C++ and not fail later down the line. All of the points mentioned are aspects of "object oriented" analysis/design/programming and I would recommend learning this in parellel with C++ from good, well written, and proven sources. Booch, Yourdon, etc. and will almost certainly mean learning UML if you do not already know it depending on what books you pick up. A good design book, & the "patterns" books by the gang of four and martin fowler, are especially handy to understand heirarchies and what C++ gives you above C, but be prepared to criticise and ignore them completely in practice if need be. Finally, try desperately to get "real world" problems and practice, practice, practice. Small things like sorting algorithms, queueing mechanisms, even simple mutex controls, up to practical but low level tasks like neural net engines, file format conversion engines, etc (Concentrating on the core objects underneath the guis/cli). before you know it you will feel that nothing is impossible and nothing outside of your ability... It's a great language. go for it....

                          M 1 Reply Last reply
                          0
                          • M Martin Cheng

                            Oh, It's unbelievable that there are responses for my questions! Thanks for the suggestions, really! Actually, I have got the concepts things about C++, like objects, hierarchies things. I guess I am lack of some projects experiences. Even I got the concepts about it, I have no idea how to use them in programming. It might be the more practices make it perfect. I have to spend much time on it and use C++ times and times. Anyway, thanks a lot! Buy the way, I red effective C++ recently. It talks about STL and boost things. I almost program with BOOST and STL library every day. They are important for the C++, aren't they ?

                            S Offline
                            S Offline
                            SeattleC
                            wrote on last edited by
                            #25

                            Martin.Cheng wrote:

                            Actually, I have got the concepts things about C++, like objects, hierarchies things. I guess I am lack of some projects experiences. Even I got the concepts about it, I have no idea how to use them in programming. It might be the more practices make it perfect.

                            You have sensed the trouble; lack of experience. If you cannot apply concepts like object orientation, you don't really understand them yet. You should therefore stop saying, "I get the concepts." You should ask questions like, "How do I learn to view a project as a collection of objects?" or "How do I decide which operations are closely enough related to put into a single object?" For the first question, I personally very much like the work of Rebecca Wirfs-Brock (search "Wirfs-Brock" on amazon) on class roles and collaborations. I used Designing Object Oriented Software to teach a team of C developers OOP, but I suspect the more recent titles are also good. For the second question, much as been written on the web on "separation of concerns" and "dependency injection". But as a practical matter of learning, you should start writing module tests for each class you write. Nothing slims down your classes like having to test all the interfaces and import all the dependencies into each test case.

                            M 1 Reply Last reply
                            0
                            • L Lost User

                              I have been turning away from .Net lately and looking for alternatives. I don't want to have to rewrite everything when a certain company heads into a different direction once more. My answer is C++. I always liked its flexibility to allow you to do very low level programming just as well as very high level programming. And today I stumbled over this video[^], in which Bjarne Stroustrup answers two simple questions. Now I know why I like C++ so much. Thanks, Bjarne.

                              M Offline
                              M Offline
                              MetalNate
                              wrote on last edited by
                              #26

                              In short, I think there are way better alternatives for .NET developer then C++. Speaking for myself, if I ever was to move away from .NET, it would only be to another "managed" language - Java, Python, Ruby, PHP, etc. Java still scores #1 on Tiobe index after all, and I don't see it changing anytime soon. It feels almost like C# 2.0 ;P so it won't be too hard moving to Java and Android development, I would miss LINQ dearly tho :( . I agree wholeheartedly on the definition of C++ as crude tool which is still perfectly viable to create masterpieces with. The problem is, that it's way too easy to become addicted to comfortable refined tools and become dependent on them. Moving from .NET to C++ feels like moving from comfortable city apartment with electric lights, hot water and other conveniences along with modern city infrastructure to stone cave in a middle of wilderness with only wooden stick in hands :) I know the language, and if asked to write something in C++, I will do it and will try my best to do it good - but I will hate every moment of writing C++ code with a passion. The only "native" language I will ever try is Objective-C (Josh Smith's experience on the matter is quite encouraging), and this is only if someone gives me iMac AND iPhone as a gift, because Apple computers are ridiculosuly overpriced in my country. Android development has one distinct advantage over iOS development tho - if Google does something incredibly stupid and kills Android and/or abandons Java, you can still just go and write Java elsewhere, while Obj-C is neither wanted nor needed by anyone outside of Apple and I have a distinct feeling that people are only using it because it's the only option for iOS developemnt (read: because Apple forces it down their throats ;P ) and they will be happy to forget it when/if Apple ship drowns.

                              F 1 Reply Last reply
                              0
                              • M MetalNate

                                In short, I think there are way better alternatives for .NET developer then C++. Speaking for myself, if I ever was to move away from .NET, it would only be to another "managed" language - Java, Python, Ruby, PHP, etc. Java still scores #1 on Tiobe index after all, and I don't see it changing anytime soon. It feels almost like C# 2.0 ;P so it won't be too hard moving to Java and Android development, I would miss LINQ dearly tho :( . I agree wholeheartedly on the definition of C++ as crude tool which is still perfectly viable to create masterpieces with. The problem is, that it's way too easy to become addicted to comfortable refined tools and become dependent on them. Moving from .NET to C++ feels like moving from comfortable city apartment with electric lights, hot water and other conveniences along with modern city infrastructure to stone cave in a middle of wilderness with only wooden stick in hands :) I know the language, and if asked to write something in C++, I will do it and will try my best to do it good - but I will hate every moment of writing C++ code with a passion. The only "native" language I will ever try is Objective-C (Josh Smith's experience on the matter is quite encouraging), and this is only if someone gives me iMac AND iPhone as a gift, because Apple computers are ridiculosuly overpriced in my country. Android development has one distinct advantage over iOS development tho - if Google does something incredibly stupid and kills Android and/or abandons Java, you can still just go and write Java elsewhere, while Obj-C is neither wanted nor needed by anyone outside of Apple and I have a distinct feeling that people are only using it because it's the only option for iOS developemnt (read: because Apple forces it down their throats ;P ) and they will be happy to forget it when/if Apple ship drowns.

                                F Offline
                                F Offline
                                Fabio Franco
                                wrote on last edited by
                                #27

                                MetalNate wrote:

                                Moving from .NET to C++ feels like moving from comfortable city apartment with electric lights, hot water and other conveniences along with modern city infrastructure to stone cave in a middle of wilderness with only wooden stick in hands

                                I loved your analogy, it cracked me up :laugh: But I think you may be missing one point. You don't need to move away from .net to use C++. It's just another tool to be used for another job. A lot of you want to do can be accomplished by both, but many tasks are better accomplished with one tool rather than the other. For example, you can't go to managed language if you're designing a kernel-mode driver. Or you can use an unmanaged component for your managed framework to perform performance dependent task. Say you're developing a real time image processing application. Chances are that you'd be better off with C++ (not saying it's the only option). One thing that I love about C++ is how it integrates easily with native hardware instructions, you can even have pure assembly instructions inside a C++ code block :rolleyes: It's so amazing that it's quite rewarding when you see blinking hardware lights just the way you programmed it to. It's a very satisfying experience. I had the opportunity to interface with hardware through C# and .net, but it is not the same thing and you can only go so far. Of course, using C++ to develop a full blown enterprise application with rich UI can be really, really painful. That's why you should always choose the right tool for the job. And I just love when the right tool for the job is C++ :)

                                To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson ---- Our heads are round so our thoughts can change direction - Francis Picabia

                                M R 2 Replies Last reply
                                0
                                • P Paul Michalik

                                  You may or may not like C++. But you can't just "turn away from .NET to C++". This is like you said "I am turning away from gasoline, since I do not want to depend on all of that oil stuff...". C++ is just a language, .NET is a eco-system of many languages, infrastructure, libraries, tools etc. If you rely on that, the language itself does not matter, but the presence of this infrastructure does.

                                  S Offline
                                  S Offline
                                  SeattleC
                                  wrote on last edited by
                                  #28

                                  paul_71 wrote:

                                  you can't just "turn away from .NET to C++".

                                  I disagree. To a significant extent, the world may be divided into projects that choose to live within a humongous infrastructure such as .NET, and projects that stand alone, importing smaller bits of third-party code when they seem relevant. .NET is very much a lifestyle choice. Many C++ projects exist because they have chosen to steer clear. .NET is 10,000 twisty little objects, all alike, and yet all different. Not all parts of .NET are equally well designed, and none of it is brilliant. It's a big infrastructure built by a big team in a big hurry. C++ is around 50 keywords, and a standard library with around 50 template classes. You can get to know all of it. All of C++ compiles to machine code. You can reason about the performance of every bit. The STL is genius, now copied by other popular languages. The people who don't like C++ because it doesn't come with a standard library having 10,000 functions don't get C++ at a fundamental level. C++ is useful because of the extent to which it is stripped down to essentials. You can't write a web browser in 10 lines of C++ code by invoking the WebBrowser object like you can do in .NET. C++ is for the guys who want to implement that WebBrowser object, and who need for it to run at a competitive speed.

                                  S 1 Reply Last reply
                                  0
                                  • F Fabio Franco

                                    MetalNate wrote:

                                    Moving from .NET to C++ feels like moving from comfortable city apartment with electric lights, hot water and other conveniences along with modern city infrastructure to stone cave in a middle of wilderness with only wooden stick in hands

                                    I loved your analogy, it cracked me up :laugh: But I think you may be missing one point. You don't need to move away from .net to use C++. It's just another tool to be used for another job. A lot of you want to do can be accomplished by both, but many tasks are better accomplished with one tool rather than the other. For example, you can't go to managed language if you're designing a kernel-mode driver. Or you can use an unmanaged component for your managed framework to perform performance dependent task. Say you're developing a real time image processing application. Chances are that you'd be better off with C++ (not saying it's the only option). One thing that I love about C++ is how it integrates easily with native hardware instructions, you can even have pure assembly instructions inside a C++ code block :rolleyes: It's so amazing that it's quite rewarding when you see blinking hardware lights just the way you programmed it to. It's a very satisfying experience. I had the opportunity to interface with hardware through C# and .net, but it is not the same thing and you can only go so far. Of course, using C++ to develop a full blown enterprise application with rich UI can be really, really painful. That's why you should always choose the right tool for the job. And I just love when the right tool for the job is C++ :)

                                    To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson ---- Our heads are round so our thoughts can change direction - Francis Picabia

                                    M Offline
                                    M Offline
                                    MetalNate
                                    wrote on last edited by
                                    #29

                                    I have never been involved in writing kernel-level software, software for microcontrollers, or game development, so I think I just never got to harness full power of C/C++ in it's natural sphere of application. My only encounter with C++ apart from university was with "full blown enterprise application with rich UI" (although it did use some 3D data visualization), and I guess this took it's part in forming my bias against it :-D

                                    F 1 Reply Last reply
                                    0
                                    • M MetalNate

                                      I have never been involved in writing kernel-level software, software for microcontrollers, or game development, so I think I just never got to harness full power of C/C++ in it's natural sphere of application. My only encounter with C++ apart from university was with "full blown enterprise application with rich UI" (although it did use some 3D data visualization), and I guess this took it's part in forming my bias against it :-D

                                      F Offline
                                      F Offline
                                      Fabio Franco
                                      wrote on last edited by
                                      #30

                                      MetalNate wrote:

                                      I have never been involved in writing kernel-level software, software for microcontrollers, or game development

                                      It's a shame, but I think you should give it a try, it's a lot of fun. Personally I'd recommend playing with an arduino device just for the fun of it.

                                      To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson ---- Our heads are round so our thoughts can change direction - Francis Picabia

                                      1 Reply Last reply
                                      0
                                      • S shiprat

                                        C++ is just a language lol, that's funny, I though it was THE language. what is .NET written in btw?

                                        R Offline
                                        R Offline
                                        richinsea
                                        wrote on last edited by
                                        #31

                                        No. PL/I is the language. Look how far it got.

                                        1 Reply Last reply
                                        0
                                        • F Fabio Franco

                                          MetalNate wrote:

                                          Moving from .NET to C++ feels like moving from comfortable city apartment with electric lights, hot water and other conveniences along with modern city infrastructure to stone cave in a middle of wilderness with only wooden stick in hands

                                          I loved your analogy, it cracked me up :laugh: But I think you may be missing one point. You don't need to move away from .net to use C++. It's just another tool to be used for another job. A lot of you want to do can be accomplished by both, but many tasks are better accomplished with one tool rather than the other. For example, you can't go to managed language if you're designing a kernel-mode driver. Or you can use an unmanaged component for your managed framework to perform performance dependent task. Say you're developing a real time image processing application. Chances are that you'd be better off with C++ (not saying it's the only option). One thing that I love about C++ is how it integrates easily with native hardware instructions, you can even have pure assembly instructions inside a C++ code block :rolleyes: It's so amazing that it's quite rewarding when you see blinking hardware lights just the way you programmed it to. It's a very satisfying experience. I had the opportunity to interface with hardware through C# and .net, but it is not the same thing and you can only go so far. Of course, using C++ to develop a full blown enterprise application with rich UI can be really, really painful. That's why you should always choose the right tool for the job. And I just love when the right tool for the job is C++ :)

                                          To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson ---- Our heads are round so our thoughts can change direction - Francis Picabia

                                          R Offline
                                          R Offline
                                          richinsea
                                          wrote on last edited by
                                          #32

                                          I cant see where he said that so I will reply here. Shouldn't that be two sticks? It is not intended as a serious comment.

                                          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