I hate C++

<p>OMG. I absolutely hate C++. I had my Computer exam today and we had 2 1/2 hours to write a monster program and I finished mine in an hour and a half but the stupid thing was giving me errors and I couldn't figure out what the error was because the dumb program was running but it was giving me four zeros as the output and it was so bloody frustrating and I was soo irritated and I went through my code step by step like 400 times but I couldn't find the damn error. And then I felt like crying cause I was so frustrated and I didn't know what to do. So I considered giving up but my computer teacher said he wouldn't let me go home until I fixed that program because he had very high expectations and everyone else finished and walked off and he delayed the next batch of people coming in because he said I needed to fix the error so I sat there trying to fix the error and then I thought I had found the solution so I changed the code but all that changed was the dumb program gave me five zeros instead of four zeros and my only consolation was that the five zeros were very neatly presented and so again I had to trawl through my code to find my mistake and I thought the dumb compiler was messed up because by that time I had gone through my code a thousand times and I went through it again before asking my teacher if he could grade me on what I'd written but he said no and he made me sit down again and I was so sad.</p>

<p>And so in my misery I continued to try and find out where my stupid logic had gone wrong. Had I messed up in the calculation part? Or the display part? The suspense was absolutely killing me and I didn't like that (and I still don't). And by this time I was very angry at that idiot Stroustroup for making that idiot language like he was carrying out some vendetta against mankind and I was also cursing my school for falling in his trap and that's very significant because I don't usually curse, but I cursed this time and by now weird thoughts were floating through my head like burning the computer lab down or something but that would be illegal and I don't like that so I sat there in that chair which was too low for my liking and I couldn't even raise it because I couldn't figure out how the lever worked, so I sat in that dumb chair trying to figure out my program. And finally my teacher came and told me I had two brackets missing and I was like: oh god, you can't be serious... but he was serious and I really did have two brackets missing so I added those two brackets and he walked off thinking my program was working and I tried to run it but it still gave me a string of zeros as the output and then I scrolled down the code and I noticed a tiny mistake, a very tiny one actually... I had declared the function but I'd forgotten to call it and I added that one stupid line (like 10 letters or characters or whatever) and my program worked perfectly and I was like this sucks and C++ sucks too cause you spend an hour writing a program and you spend the rest of the day trying to debug it and that sucks totally.</p>

<p>Seriously, if Stroustroup was here infront of me right now, I'd throw my shoe at him.</p>

<p>(I wrote this to cause I was angry.. It's completely random, I know. But if you've ever programmed in C++, you've felt my pain.)</p>

<p>Then why not try quiting? If you hate C++ so much, just drop it for some time and hit sth u really like. Or is it that u just can't stand the process of checking those stupid teeny mistakes, but ya actually love C++?
Anyway, good for ya to pour your thoughts out, way to go man!
Go and take a nap, just try to get rid of that strory in your mind</p>

<p>If I take computers as a subject then I have to take C++. No other option. And I love computers way too much to drop it because of one cursed language. Though I'd rather they teach Python or something. But they won't. They've already been sucked into the C++ trap. Sigh.</p>

<p>I feel better now. Yea.</p>

<p>The problem is that C++ (with all its warts) is still an industry workhorse. I haven't coded in any other language for 20 years, but I'll soon switch to Objective-C (similar to C Sharp).</p>

<p>Ugh, I hate c++ too. I just my midterm a few days ago. Hard as hell.
But C++ leaves my brain fried and me feeling like the world's biggest idiot.
We had some easy program to write: find palindromes in a string without using reverse() and while using iterators. It took me forever to figure something that simple out and then when it comes to you - it's ridiculously easy and then you feel like a moron. </p>

<p>I'm a PHP person, give me the same assignment in PHP and I can do it. My problem is that I keep trying to rationalize C++ in PHP-thinking and, of course, that doesn't work.</p>

<p>I usually use answers.yahoo.com to get coding help on assignments, though. They always give the correct answer, in my experience.</p>

<p>You'll have that "code in an hour debug for a day" problem in most languages.</p>

<p>First off, periods would be useful.</p>

<p>Second, everyone has gone through this. It's always a missing prantheses or something so incredbily trivial. In college, I spent about 3-4 hours debugging and then realized I didn't close a parantheses. On another assignment (a siumlation), I got a bunch of completely wrong simulations because I put 0.5 instead of 0.05.</p>

<p>It happens to everyone. don't worry about it.</p>

<p>And don't let on to prospective employers that you hate or blame a language, even if you honestly feel like a language is awful. An exception might be APL; go ahead a blame that one.</p>

<p>vossron: Yea, I know it's essential for a job in the industry. I wish it wasn't though. There are plenty of better languages that are more user-friendly.</p>

<p>PlattsburghLoser: PHP is a much better language. It was one of the first languages I learnt and I absolutely loved it. Though it's not as powerful as C++ it makes web programming a breeze. Web programming in C++, however, is hell.</p>

<p>PresidentDunn: I'd disagree on that. There are quite a few languages that make debugging simple, and that don't have as many symbols, and parentheses and whatnots. Python comes to mind. And Ruby.</p>

<p>dontno: I know. =( My friend joined a software company and started work on a software written in C++, but the software didn't have any comments. The way he said it it was a nightmare. -___-</p>

<p>At least you were able to get it fixed. I once did a contest where I lost 15 percent of the points that would have been fixed from literally changing just two characters in a program.</p>

<p>"but the software didn't have any comments"</p>

<p>There's one thing worse: Incorrect comments. People are rushed or lazy, and fix a bug without changing the accompanying comments. This can waste hours of your time.</p>

<p>You can't really blame the language if you defined a function you never bothered to call. This is where a simple cross reference showing where all variables and functions are defined and used would have instantly made this error stick out.</p>

<p>Has anyone ever seen even a single published study showing that C++ makes programmers more productive or is less error prone than any other language? I doubt it. I think any of the old 4GL languages could accomplish the same thing more efficiently than C++.</p>

<p>As in all programming, you can't go wrong following the keep it simple principle.</p>

<p>Yeah, runtime errors are pretty annoying. The compiler doesn't tell you on which line you messed up.</p>

<p>Theres nothing simpler than C or C++, maybe assembly. Also php is not a programming language.</p>

<p>Of course PHP is a language. What else would it be? :)</p>

<p>Also, depends on what you mean by "simpler". If you mean, no languages are closer to the hardware, and no other languages explicitly let on what's "under the hood", then yes, C/C++ are the simplest.</p>

<p>But if you mean simpler as easier to learn, easier to read, easier to write, easier to debug, C/C++ are far from the simplest. In fact, they're among the least simple languages, in those respects.</p>

<p>Personally, I vote Python :)</p>

<p>I never said it wasn't a language, I said it wasn't a programming language. its considered a scripting language. </p>

<p>C assumes competent programmers, other languages like python don't. If you want to go into the realm of simple based on competency then thats fine I agree with you that python is simpler than C. But I mean cmon, lets assume the programmer is at least competent. If they are competent then C is by far the most flexible and easiest language to use bar none. Theres a real good reason its one of the oldest languages and still the second most used world wide. Theres a reason most modern languages today are either themselves built off of C or are derivatives of it.</p>

<p>I don't want to get in a debate, but there are plenty of "competent" programmers using python (I would certainly hope that I am competent! :) )</p>

<p>C (and to some extent C++) is an incredible and powerful language, no doubt (that's why it's become a de-facto standard) but they're increasingly becoming dated. The future is full of stuff like Unicode, safe pointer semantics, strong typing, automated memory management, portability, modern intermodule compatibility, rapid prototyping, functional programming, powerful standard libraries, etc ad infinium.</p>

<p>Sure, there are ways to sort of handle all of those issues in C/C++, but they are often much, much easier to deal with in more modern languages.</p>

<p>strong typing and functional programming are nearly 2x as old as C and B was created in reflection that not everybody needed strongly typed languages and C followed suit. Functional languages have always since there start been considered the next big thing, but uits been nearly 50 years and still nothing. I love languages like Erlang and ML, I mean I love them. But most people cant for the life of them program in them efficiently. They require a competent programmer 10x over what C requires. There are only a select few who will use functional languages and they already test to be the smartest at what they do.</p>

<p>Functional programming is a mindset and style, and not a language. I can write functional programming in C/C++ if I wanted to, it just isn't necessarily easy. </p>

<p>Erlang, ML, Lisp haven't become commonplace for the same reasons the thousands of non-"functional languages" other than C/C++ have not either.</p>

<p>Yet there are many circumstances when functional programming is very useful, and especially so considering the explosion of multicore processors in recent years. Soon CPU's will have 8, 16, 24 cores and the only way to achieve performance will be to parallelize. There are many ways to do this, but functional programming is one very common & important option.</p>

<p>"strong typing" is kind of ambiguous, so I'm sorry for using it like that. There are a lot of debates about it and it ends up being a taste issue, but I for one believe that it is a good thing when the language does not require weak typing at any point (this is mostly a criticism of C and not C++) - that is, I shouldn't be required to leave my type-safety bubble.</p>

<p>I've always been curious about computer programming. So I'll ask it here b/c some of you seem rather informed about the topic.</p>

<p>How exactly do you become a hacker? How do people become so good that they can break into sites and make viruses and even beneficial stuff? </p>

<p>I took Intro to Comp in college and it was incredibly easy, but it didnt have much real-world application b/c it was so basic. </p>

<p>Care to enlighten me?</p>