Daniel Duffy
C++ author, trainer
- Joined
- 10/4/07
- Messages
- 10,335
- Points
- 648
Maybe this will convince to write in C (it's bad and good)
I wrote my first ever program in PL/I in 1971 , it is (0.25*Fortran + 0.75*Cobol) :Dlol... "PL1 is 80s" but C is 70s.
Here's a radical idea: in addition to learning C++, how about learning D (a programming language which much of the structure of C++, native code generation, range checking and garbage collection).
Why?
The reliability of C/C++ software is terrible. A lot of financial software can be categorized as "critical systems". To build systems like this we should use the best tools available. And C++ simply is not the best tool available. The reliability of C++ software is much worse than software written in Java, exactly because C++ does not have range checking and garbage collection.
I find that these lengthy rants about which programming language is good, and which is not, are typically pointless (and also typically mostly written by people without too much actual practical experience, thus useless). Namely, in real world these things work in very simple manner: either you as a programmer cannot influence the programming language choice, in which case you either don't accept the job if you really can't live with the choice imposed, or you just shut your mouth up and get to the work; or you can choose the implementation language, in which case you choose the language you're most comfortable with, exactly because this way you know you're going to produce best results in quickest time.
Thus, while everything you write above is mostly valid for example for some sort of academic discussion on which programming language novices should be taught as first programming language in high school or college, so that they could acquire sound programming practices along the way, it is not relevant at all for any decently experienced programmer. For example - everything you say about that C/C++ are more prone to pointer handling errors is true in principle but, as you're already pointed to previously by some other posters here, any C/C++ programmer with 1+ years (or even less) of experience will know how not to fall into this sort of traps, and which tools (and these days there exist loads of these) to use to check for them.
(Also, some of your claims are just factually wrong: for example, you said that D has an advantage over Java as it could be compiled to native code, while Java cannot - well, check under "gcj".)
try edXyes,it was worth to learn c,because c is the basic program of computer....with out c u didn't study any programming language.c++ is used in software language like PHP,.NET,etc...c is used in hardware language like embedded c......to get more details and training in c refer this webpage: lastbenchindia.com/
no pain, no gainIn the words of Linus Torvalds:
"...
C++ is a horrible language. It's made more horrible by the fact that a lot
of substandard programmers use it, to the point where it's much much
easier to generate total and utter crap with it. Quite frankly, even if
the choice of C were to do *nothing* but keep the C++ programmers out,
that in itself would be a huge reason to use C.
...
In other words, the only way to do good, efficient, and system-level and
portable C++ ends up to limit yourself to all the things that are
basically available in C. And limiting your project to C means that people
don't screw that up, and also means that you get a lot of programmers that
do actually understand low-level issues and don't screw things up with any
idiotic "object model" crap.
...
"
http://thread.gmane.org/gmane.comp.version-control.git/57643/focus=57918
Read the whole exchange. It will open your eyes.
Looking back, I am very glad that the QN C++ course has 2 modules on C (you really learn what a compiler is). Of course, there's a lot of deprecated C code not to use butYou can bypass C. In C++ concentrate on things like (ordinary) pointers and function pointers. And memory management.
Hehe, the simplicity of C is charming. Heres the source code of Quake 3 Arena - a multiplayer shooter game written entirely in C. Its amazing how far a simple language without OOP can go.C is like a Bear Grylls survival weekend, Python a cruise in the Bahamas.