Why I like C++
-
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.
-
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.
I like C++... it's been old reliable for a long time now...
-
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.
Interesting interview! I've always like C++ for a number of reasons which he has eloquently stated.
VS2010/Atmel Studio 6.0 ToDo Manager Extension
Version 3.0 now available. There is no place like 127.0.0.1 -
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.
I like C++, but I don't like what it's turning into (and how many code designs insist on the most complicated implementations.) Moreover, just because something could be represented as an object and in a hierarchy doesn't mean that it should be.
-
I like C++, but I don't like what it's turning into (and how many code designs insist on the most complicated implementations.) Moreover, just because something could be represented as an object and in a hierarchy doesn't mean that it should be.
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?
-
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.
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.
-
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?
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
-
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?
Coming from an Algol (60 and 68R) and C background, I started using C++ from version 1, as it seemed such an eloquent concept and made expressing problems for the computer so much more 'natural' for want of a better word. I carried on developing larger systems, even through the mess the new iostreams and broken manipulators of version 2 made of my code, and the horrors introduced (inadvertently) into third party libraries by both compiler writer and library implementor misunderstandings of references. However, in recent years, my aged and fading brain started to find it difficult to understand and even harder to remember how to use the ever increasing new features and complex semantics for the more esoteric aspects of the language, to the point where it was taking more work to understand how to use the language than it was to solve the problems I was working on. At that point I started to switch to other languages: Java/AJAX for desktop/web development, and Python for general purpose stuff where speed was not an issue. I rarely do any C++ these days, though still do a fair bit of C when metal-bashing is required. Perhaps I'm cutting off my nose to spite my face by not enthusiastically grasping C++0x (see: I can't even remember the correct ETLA for the latest revision!), but learning wonderful new concepts doesn't pay the bills...
-
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.
I never left C++. Although I've dabbled a bit in .NET (and Java, for that matter) I've never really got to the level of productivity in managed languages that I can manage in C++ code. With C++ 11 here, this is an interesting time to be using the language. On that note, Bjarne's doing a keynote for us at the ACCU Conference[^] next April. If his last appearance is anything to go by, it should be very entertaining and rather humbling.
Anna :rose: Tech Blog | Visual Lint "Why would anyone prefer to wield a weapon that takes both hands at once, when they could use a lighter (and obviously superior) weapon that allows you to wield multiple ones at a time, and thus supports multi-paradigm carnage?"
-
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.
I just deleted a very long response. Simple answer: Really, can't I? Why should I allow Mickeysoft (or anybody else) to lock me into their walled gardens? Why should I pay for the OS, the development environment and a modest 30% developer tax on top of that for the honor of being allowed to publish my work? Why should I work more to keep my code current than to expand it? And what makes you think that there are no alternatives? No, this time Mickeysoft has jumped the shark and nuked the fridge, all at the same time. I will rewrite my code only once more. To make certain that they can't do that to me again, no matter what crazy ideas they have next. Perhaps then I will see the day when a code module is actually reused instead of rewritten.
-
Coming from an Algol (60 and 68R) and C background, I started using C++ from version 1, as it seemed such an eloquent concept and made expressing problems for the computer so much more 'natural' for want of a better word. I carried on developing larger systems, even through the mess the new iostreams and broken manipulators of version 2 made of my code, and the horrors introduced (inadvertently) into third party libraries by both compiler writer and library implementor misunderstandings of references. However, in recent years, my aged and fading brain started to find it difficult to understand and even harder to remember how to use the ever increasing new features and complex semantics for the more esoteric aspects of the language, to the point where it was taking more work to understand how to use the language than it was to solve the problems I was working on. At that point I started to switch to other languages: Java/AJAX for desktop/web development, and Python for general purpose stuff where speed was not an issue. I rarely do any C++ these days, though still do a fair bit of C when metal-bashing is required. Perhaps I'm cutting off my nose to spite my face by not enthusiastically grasping C++0x (see: I can't even remember the correct ETLA for the latest revision!), but learning wonderful new concepts doesn't pay the bills...
Don't worry. Nobody gets younger. If I were to put together a team, I would go for as many veterans as I can get. I trust experience more than anybody's marketing promises or 'paradigm of the week'. If that makes them a little conservative, then so be it. C++ 11 does introduce new concepts (and one I would really welcome is postponed), but they are not forced on you. You can keep going as you did before. Along the way one or the other feature may prove to be useful for what you are doing and then you should not hesitate to learn more about it. There is no need to hurry.
-
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.
-
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
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.
-
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.
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.)
-
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?
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.
-
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.
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.
-
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.)
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.
-
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.
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 ...
-
C++ is just a language lol, that's funny, I though it was THE language. what is .NET written in btw?
-
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.
Excellent advice for learning any programming language!