C has got a major role in the programming world especially in the operating systems where most of the today's OS are written in C.
Some interesting facts about C & C++:
* The Linux kernel, is written in C as a matter of policy, and not in C++.
* Linux is in C because Linus hates C++. Other operating systems, such as Windows, are in C++.
Opinions>
* For OO abstraction you have Java or C# – and for memory management and low level performance you have C
* The Linux kernel is written in C because Linus says that C++ sucks. For some reason that makes good C++ programmers reluctant to work for him. It has nothing at all to do with performance or anything.
* One of the points Linus has made against C++ is that there are a lot more bad C++ developers out there than C developers, so using C doesn't present as many disadvantages as they gain from keeping bad C++ devs out of their project
* the legitimate arguments that Linus makes against C++ have more to do with the people using it than the language itself. That said, when Linux kernel development started, C++ debuggers and tooling were terrible. It’s still hard to find a good debugger than can handle macros and templates correctly in all cases.
* C++ is faster than C. You can essentially compile any C as C++ (with changes irrelevant to runtime speed), so it is trivial to show that C++ is as fast as C. Then, C++ gives you extra expressive power with things like templates, enabling things like having the compiler compute things.
* Been thinking about this a bit more and I think I am changing my view even further. We rarely study assembly language in order to understand higher level languages, so I am wondering if tomorrows programmers will even ever need to be concerned with memory or other lower level details. Certainly today it is important, but I could see that basic knowledge becoming less and less valuable.
* I believe all good programmers always feel the need to dig deeper and not understanding what goes under the hood is unsettling. Like in our days of C/C++, we wanted to learn assembly. In the modern day of C# we want to learn C/C++.
* once you learn C++ to an adequate level, you can pick up any other language really fast and you've developed a deeper understanding of how software works on a lower level – a knowledge that’s much harder to acquire when starting out at higher-level languages; I’ve always frowned upon the idea of starting programmers out on Java for that very reason.
Facts>
* games, which have been traditionally coded in C++.
* C++ has it’s uses for high performance apps that require detailed control over memory management
* C++ never left, but it definitely faded.
It is still in use for many systems as almost all applications need some access to lower level hardware and very perform-ant code in the OS and other subsystems. But, a majority of code we write today is written on top of the back of that C++ code. Just like someone needs to write assembly and actual logical gates that ends up on silicon in order for our CPU's to work. My points is that most developers today don’t need that kind of power, because the price that comes with that kind of power is high.
* A big difference between the two languages is that C++ was not strictly OOPS it was a multiparadigm language. C# was originally just restricted to OOPS slowly adding support over recent years for more powerful paradigms, but they still have a long way to go.
* This is indeed not a language for the faint of heart. You need patience, and you need determination. You won’t learn the language by copy/pasting examples for tutorials. You will need to read books and articles. Coding in C# or even Java is more productive than coding in C++. But when you try to make your code stronger (think, *industrial* strength), when “shit happens” is not a viable excuse, when you are trying to reach excellence or perfection, this is the moment the “easy languages” let you down (that is, when they are not actively fighting against you). And this is the moment when C++ really shines.Indeed, C++ is not “back”. C++ is “better”.
*Yes, C++ can still be useful in some problem domains. Yes, C++11 is better than C++98. But we stopped using C++ for a reason, and that reason wasn't “it doesn't have lambda expressions”. The so-called resurgence of C++ is a well-intention ed but horribly misguided attempt to get people to concentrate on exactly the wrong problem.
* Well, I guess it all depends on what kind of applications one aspires to write. If you’re writing a state-of-the-art game, a web browser, a word processor, a digital content creation tool, then C/C++ continues to be the best (if not the only) choice. Sure, not everybody has to write those types of applications but just because you don’t doesn't mean C++ is “not back”
* You cannot write nice GUI's with C++ in a week, do not try to learn it to write GUIs
* C does not solve all the problems, nor is template meta programming or overloading complex. It just takes a little bit time, patience and effort to learn it and appreciate it. It does not come over night. In C you can write fast code, but in C++ you can write fast code that can be maintained better, and extended easily. If you do not want to think in OO or Functional terms do not use C++, use C.
* If you learn C++ as a big brother of C, there is always chance you will suffer. Please learn C++ as C++, this will set the proper learning context in your mind.
* OK, I’m feeling like a dinosaur. When I started, there was a similar article, this time about assembly language. If you absolutely had to squeeze the last cycle out of your hardware, it was the way to go.
Some interesting facts about C & C++:
* The Linux kernel, is written in C as a matter of policy, and not in C++.
* Linux is in C because Linus hates C++. Other operating systems, such as Windows, are in C++.
Opinions>
* For OO abstraction you have Java or C# – and for memory management and low level performance you have C
* The Linux kernel is written in C because Linus says that C++ sucks. For some reason that makes good C++ programmers reluctant to work for him. It has nothing at all to do with performance or anything.
* One of the points Linus has made against C++ is that there are a lot more bad C++ developers out there than C developers, so using C doesn't present as many disadvantages as they gain from keeping bad C++ devs out of their project
* the legitimate arguments that Linus makes against C++ have more to do with the people using it than the language itself. That said, when Linux kernel development started, C++ debuggers and tooling were terrible. It’s still hard to find a good debugger than can handle macros and templates correctly in all cases.
* C++ is faster than C. You can essentially compile any C as C++ (with changes irrelevant to runtime speed), so it is trivial to show that C++ is as fast as C. Then, C++ gives you extra expressive power with things like templates, enabling things like having the compiler compute things.
* Been thinking about this a bit more and I think I am changing my view even further. We rarely study assembly language in order to understand higher level languages, so I am wondering if tomorrows programmers will even ever need to be concerned with memory or other lower level details. Certainly today it is important, but I could see that basic knowledge becoming less and less valuable.
* I believe all good programmers always feel the need to dig deeper and not understanding what goes under the hood is unsettling. Like in our days of C/C++, we wanted to learn assembly. In the modern day of C# we want to learn C/C++.
* once you learn C++ to an adequate level, you can pick up any other language really fast and you've developed a deeper understanding of how software works on a lower level – a knowledge that’s much harder to acquire when starting out at higher-level languages; I’ve always frowned upon the idea of starting programmers out on Java for that very reason.
Facts>
* games, which have been traditionally coded in C++.
* C++ has it’s uses for high performance apps that require detailed control over memory management
* C++ never left, but it definitely faded.
It is still in use for many systems as almost all applications need some access to lower level hardware and very perform-ant code in the OS and other subsystems. But, a majority of code we write today is written on top of the back of that C++ code. Just like someone needs to write assembly and actual logical gates that ends up on silicon in order for our CPU's to work. My points is that most developers today don’t need that kind of power, because the price that comes with that kind of power is high.
* A big difference between the two languages is that C++ was not strictly OOPS it was a multiparadigm language. C# was originally just restricted to OOPS slowly adding support over recent years for more powerful paradigms, but they still have a long way to go.
* This is indeed not a language for the faint of heart. You need patience, and you need determination. You won’t learn the language by copy/pasting examples for tutorials. You will need to read books and articles. Coding in C# or even Java is more productive than coding in C++. But when you try to make your code stronger (think, *industrial* strength), when “shit happens” is not a viable excuse, when you are trying to reach excellence or perfection, this is the moment the “easy languages” let you down (that is, when they are not actively fighting against you). And this is the moment when C++ really shines.Indeed, C++ is not “back”. C++ is “better”.
*Yes, C++ can still be useful in some problem domains. Yes, C++11 is better than C++98. But we stopped using C++ for a reason, and that reason wasn't “it doesn't have lambda expressions”. The so-called resurgence of C++ is a well-intention ed but horribly misguided attempt to get people to concentrate on exactly the wrong problem.
* Well, I guess it all depends on what kind of applications one aspires to write. If you’re writing a state-of-the-art game, a web browser, a word processor, a digital content creation tool, then C/C++ continues to be the best (if not the only) choice. Sure, not everybody has to write those types of applications but just because you don’t doesn't mean C++ is “not back”
* You cannot write nice GUI's with C++ in a week, do not try to learn it to write GUIs
* C does not solve all the problems, nor is template meta programming or overloading complex. It just takes a little bit time, patience and effort to learn it and appreciate it. It does not come over night. In C you can write fast code, but in C++ you can write fast code that can be maintained better, and extended easily. If you do not want to think in OO or Functional terms do not use C++, use C.
* If you learn C++ as a big brother of C, there is always chance you will suffer. Please learn C++ as C++, this will set the proper learning context in your mind.
* OK, I’m feeling like a dinosaur. When I started, there was a similar article, this time about assembly language. If you absolutely had to squeeze the last cycle out of your hardware, it was the way to go.
0 comments:
Post a Comment