Thread: Programming!
View Single Post
Old March 1st, 2013 (9:19 PM). Edited March 1st, 2013 by twocows.
twocows's Avatar
twocows twocows is offline
Mostly Benign
  • Gold Tier
Join Date: Mar 2009
Location: Michigan
Age: 27
Gender: Male
Nature: Lax
Posts: 4,202
Originally Posted by Archenoth View Post
I may regret asking this, but why do you hate C++ so much anyway? I'm curious.

I see a lower level language that has a psuedo object-oriented paradigm, meaning it's easier to organize code in larger projects. I see improved APIs over C for things like String handling, and I see a language that you can write C code in and have it work if you rather.

It has quite a few more capabilities than C.

Granted, I personally rather C myself... But this is because it is a really small language and I can get my code to compile everywhere. I never really thought of C++ as an inferior language to it, much less as the monstrosity your posts make it out to be...

So, mind filling me in here?
I get this question sometimes, and I always direct the people who ask it here. I could write an explanation myself, but there's nothing I could say that Yossi Kreinin hasn't said in more detail.

One of my biggest personal pet peeves is this. Operator overloading is far too easy to abuse and the benefits are negligible. That's not to downplay any of the other major problems with C++, but this one takes the cake for me.

Operator overloading's one of those things that sounds useful but really isn't. There are a lot of these type of things in C++ because it's a poorly thought out language. I can almost picture how C++ was made: Bjarne makes a public query "what's missing in C?" He gets about a billion responses. However, instead of filtering out the garbage and taking into careful consideration what C desperately needs and what's just nonsense that doesn't need to be there, he implements all ten thousand feature requests without looking at them twice. I'm sure it didn't quite happen that way, but that's kind of how it seems to me. There's too much garbage in C++; yes C lacked some very important functionality, but C++ is not the correct solution to that problem.

There are very few useful improvements in C++ over C, though unfortunately the ones that are there are pretty major. However, a good portion of those improvements are provided in glib, which I use most of the time if I'm doing C programming. I'm also looking into GObject at the moment, which seems useful.
Political Simulator
Reply With Quote