I am dealing around with C# .Net for almost around a year now. I got lots of exp
ID: 652413 • Letter: I
Question
I am dealing around with C# .Net for almost around a year now. I got lots of experience (I owe most of it to guys at stackoverflow).
Now I am thinking to start working with C++ as well. Mainly because I would like to be able write codes resulting in applications that are not .Net dependent so they can be executed in most of environments also having cross-platform in mind. Although I have to confess, writing code in .Net with C# and Visual Studio can not be easier nowadays.
Of my other reasons I can name, since I am studying electrical engineering, who knows maybe I later need to write drivers for hardwares!
My questions are: 1- Am I right with the idea of learning C++ I mean is it add to my value if say I am going to work as a developer later? 2- What tools will I need to start programming in native C++ that is perhaps compilers and IDE
Explanation / Answer
Some warnings to avoid some common "detours":
1) C++ and C# looks very similar, but their similitude ends just there (in the look).
2) "Native application" -on both Windows and Linux- are not C++, but C since C is the native language for both the OS kernel API. In this sense, all C++ libraries interfacing the OS are just one level of abstraction away
3) C# libraries (.Net in particular) is strongly based on an OOP hierarchy. In C++, OOP is just one of the possible programing paradign, and not always the most efficient, but ...
4) C++ had a long standardization process that lasted decades. During this process it changed a lot either as a language and as the standard library. Unfortunately many frameworks and libraries developed to support OS native interface where written decades ago, and still have long no-more standard backlog. As far of today, there is just no C++11 GUI library that is really inspired by C++11 itself, rather than making pre-C++11 code compilable in C++11.
5) As a result, learnig the "state of art" C++ will make you fine and efficient in deploying your own algorithms and classes, but drops you back to C wherever you need to interact with the native API or ...
6) Learning one of the existing C++ framework that abstract the GUI concept (Like MFC) sometime even on multiple platform (Like GTK, WxWidget etc.), will not make you a "good C++ programmer" since that will bring you back to C++03 or even C++98.
All that said, you have two paths:
a) Learn a framework and through that learn C++ (or ... that part of C++ used to sustain the framework itself). This will make you fast productive, but less efficient in code structuring and proper reuse. (you use "past techniques", and "framework specific tips & tricks")
b) Learn C++ for what it is (start with book that teach C++ together with its library: avoid all books that talk about pointers and array before vectors and containers), and once you understood the proper practice, develop yourself the API wrappers (is not that difficult) to sustain your own apps, but be ready to replace them as soon as new framework will come for C++11 GUI system.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.