1. If C++ was a good language, then nobody would bother spending their time and career to create yet another compiled language, of which there are several thousands of them and rising.
2. Anybody who could program a proper compiler will have the aptitude to use C++, but they obviously don't want to.
I think it's an excellent language if the only sepples features you use are:
- Templates (don't do anything more than what Java's generics does; avoid metaprogramming spaghetti shite or face the compiler errors)
- Basic classes (no private data or any OOP-zealotry crap)
- Exceptions (again, only if you use it for truly exceptional cases)
- Lambdas
- constexpr (a less powerful sort of defmacro)
- auto
All of the above features are good because they remove boilerplate from typical C code. Unfortunately it's easy to start using the steaming piles of shit that are the rest of the language features. That's why it makes a lot of sense to use pure C. The lesson here is to use C when you're programming with others, and C++ when you're working on something yourself.
>>4 The lesson here is to use C when you're programming with others, and C++ when you're working on something yourself.
No, because C++ is shit. I'll use C when I need to use anything like C, thanks.
Name:
Anonymous2012-11-16 5:55
>>If you confine yourself to the C subset of it.
I don't quite understand this sentiment.
RAII and constructors/destructors are a big win over manually releasing resources.
Especially in error cases you can't test everything and every path, and that's where the leak will hide.
If you work towards fully using exceptions, RAII and std::unique_ptr you won't ever leak _anything_, and resources will be minimally used. What other language can claim that?
C++ used correctly is actually very productive.
Of course some C++ features are better left untouched like dynamic_cast.
Template bloat, language complexity and implicits are very rarely a problem in production use.
>>12
C has namespaces, just not user-definable.
Both of those things can use libraries if you really can't be bothered to do so yourself (in fact, most languages' features like that are essentially libraries themselves).
C has namespaces, just not user-definable.
doh, you know what I meant
Both of those things can use libraries if you really can't be bothered to do so yourself (in fact, most languages' features like that are essentially libraries themselves)
You're missing the point. Of course they could be implemented in C and maybe are too but in sepples they're in the highly reliable and commonly used standard library. I don't want to browse the internet for some shitty half assed bug ridden library that hasn't been updated in a decade and that no one knows just to not have to reinvent the wheel.
Name:
Anonymous2012-11-16 13:39
Still not using Vala, faggots? Your pretty OOP namespaces and C#-ish code, within a powerful compiled language, translated to C, so fully compatible with C libraries and code. Not using it is accepting to suck Jewish cocks.
>>22
Auto is for pussies, like C suckers.
Real men at least count what the hell they are PUSHing into RAM, not just wait to automagically get their unused variables POPped.