C++ takes a lot of heat because it doesn't conform to today's fad ideas of mainline programming (this is IMHO, of course ) namely: Strict adherence to OOP principles, and type safety. C++ wasn't designed to be an OO language, but rather to give you the ability to write OO code if you chose to. It was not really written to be type safe because strictly enforcing type safety can limit programmers, to a certain degree. It is a language of choice, designed to support multiple paradigms. Honestly, I think pure OO and type safety are both overrated... just like you should use the right tool for the job, you should use the right paradigm for the job -- and sometimes that is somewhat subjective. As for C++ being dangerous: Sure it is... it makes no effort to hold your hand. If you or I, as programmers, mess up then it won't work properly... because we messed up. The idea is to learn the tools available, apply good design skills (and I tend to think at least some degree of creative intuition), and be careful. If something is broken, take responsibility and fix it. Java/C# have somewhat different approach... They are "safer" to work in as often times you won't go quite as humorously or terrifyingly wrong, and yet they somewhat restrict you from trying the crazy idea which later turns out to be brilliant, etc etc etc. Of course, many will disagree, that is fine. When it comes to it, C++ is just as valid a language as Java/C#/whatever depending on use, and on programmer comfort and preference.
good points there.
heres another one:
it does not force you to do things in a specifiec mannor, i can do thread however i want, or i can read files however i want.
but the down side is that there are a lot of ways to shoot yourself in the foot, but when you have learnt that shooting yourself in the foot is not the way forward you do it in a better way
To be honest, I give you the exact same advice I gave medevilenemy, you should probably familiarize yourself with other languages a bit more, as your examples make very little sense. To use your file reading example, as for example in C#, I can't think of a single way you couldn't read a file like you could in C++. I mean, if you want to read a file byte by byte, you can, if you want to read a file to a memory buffer, you can, hell if you want to pInvoke back to the Win32 apis for whatever bizarro reason you can think of... you can.
Really, and with complete sincerity, I recommend you try a couple other languages, instead of going by their "reputations". I believe it will be an eye opening experience for you. I am not saying you will quit being a C++ programmer after, but I almost guarantee you will be a better programmer after, regardless to which language you chose to go with.
yes it proberbly was not the best example, but my point is that you can do it any way you want, in C# i found that certain stuff had to be done a certain way, wheres C++ does not really have a certain way of doing stuff.