Popular Myths about C++, Part 3
isocpp.org
Popular Myths about C++, Part 3
1–10 of 114 posts
Re: Popular Myths about C++, Part 3
#2> “C++ is an Object-Oriented Language”
> “For reliable software, you need Garbage Collection”
> “For efficiency, you must write low-level code”
> “C++ is for large, complicated, programs only”
Well, 2.5/5 of those aren't myths. You certainly don't need to write low-level code for efficiency, C++ does a rather poor job of acting like an OO language, and you don't need Garbage Collection, you just need to not manage memory manually, for which solutions other than GCs exist.
You don't have to learn all of C to write C++, but unfortunately you have to learn C to understand other people's C++, because other people will not restrict themselves to the subset of C++ you consider respectable. That's true both for the C bits of C++ and for the obscenely complex corners of C++.
And C++ isn't just for large, complicated programs; it's for small, complicated programs too.
Re: Popular Myths about C++, Part 3
#3Re: Popular Myths about C++, Part 3
#4In 1995 C++ it wasn't a good choice. In 2000 it was a poor decision in most cases. In 2005 it was a bad decision in almost every case. In 2010 it was completely indefensible. It is almost 2015, why are we even talking about it? C++ was a mistake. A bad detour on the highway of computing.
Re: Popular Myths about C++, Part 3
#5In 1995 C++ it wasn't a good choice. In 2000 it was a poor decision in most cases. In 2005 it was a bad decision in almost every case. In 2010 it was completely indefensible. It is almost 2015, why are we even talking about it? C++ was a mistake. A bad detour on the highway of computing.
Re: Popular Myths about C++, Part 3
#6Re: Popular Myths about C++, Part 3
#7 int greater(const void* p, const void* q)
{
return *(double *)p - *(double *)q;
}
would work just as well.EDIT: DON'T USE THIS, WONT ALWAYS WORK
Re: Popular Myths about C++, Part 3
#8In 1995 C++ it wasn't a good choice. In 2000 it was a poor decision in most cases. In 2005 it was a bad decision in almost every case. In 2010 it was completely indefensible. It is almost 2015, why are we even talking about it? C++ was a mistake. A bad detour on the highway of computing.
Re: Popular Myths about C++, Part 3
#9The C greater function is unnecessarily long int greater(const void* p, const void* q) { return *(double *)p - *(double *)q; } would work just as well. EDIT: DON'T USE THIS, WONT ALWAYS WORK
Re: Popular Myths about C++, Part 3
#10In 1995 C++ it wasn't a good choice. In 2000 it was a poor decision in most cases. In 2005 it was a bad decision in almost every case. In 2010 it was completely indefensible. It is almost 2015, why are we even talking about it? C++ was a mistake. A bad detour on the highway of computing.
So what's an alternative?