Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

C++

Name: Anonymous 2012-11-15 22:27

Is a good language.

Name: Anonymous 2012-11-15 22:38

If you confine yourself to the C subset of it.

Name: Anonymous 2012-11-15 22:53

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.

3. Therefore, le strong sage

Name: Anonymous 2012-11-15 23:12

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.

Name: Anonymous 2012-11-16 0:04

for (auto x : iterable)?
unique/shared_ptr?
RAII?

Name: Anonymous 2012-11-16 4:33

>>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: Anonymous 2012-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.

Name: Anonymous 2012-11-16 6:35

>>7
Leaks does not simply hide with valgrind.

Name: Anonymous 2012-11-16 7:41

>>8
Trusting valgrind to find all your fuckups is so fucking bad.

Name: Anonymous 2012-11-16 9:10

>>8
Valgrind is certainly a good argument for C. But any type of resource can leak, not only those detected by valgrind.

It's all about that: in C you must release your mutexes by hand, release your memory by hand, maintain your invariants by hand...

Even someone obsessed with details _will_ fuck-up. Sooner or later.

It's like saying static analysis or testing will catch all your bugs: it does not really work like that.

I suggest you read http://fr.slideshare.net/dcacm/patterns-of-human-error

Name: Anonymous 2012-11-16 9:59

>>10
fr
Back to le Reddit, please.

Name: Anonymous 2012-11-16 11:36

>>4

There are also namespaces and the standard library

C doesn't even have basic datastructures like linked lists or decent string handling.

Name: Anonymous 2012-11-16 11:45

C++ is a good language
I lol'd.

Name: Anonymous 2012-11-16 11:58

>>12
Those are trivial to build, the complaint I have is that it isn't an easily extendable language.

Name: Anonymous 2012-11-16 12:39

>>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).

Name: Anonymous 2012-11-16 13:01

>>15

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: Anonymous 2012-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.

Name: Anonymous 2012-11-16 14:11

>>16
And that's the problem with C++. Everything and the kitchen sink.
I don't see how anyone could consider it a C replacement when it's so huge.

Name: Anonymous 2012-11-16 14:50

>>17
Reference counting is shit.

Name: Anonymous 2012-11-16 14:58

>>19
Garbage collection is for pussies, like Java suckers.

Name: Anonymous 2012-11-16 15:29

>>20
Real men blow your heap and advise you to buy MOAR RAM.

Name: Anonymous 2012-11-16 15:46

>>21
Real men at least count what the hell they are putting into RAM, not just wait to automagically get their unused variables released.

Name: Anonymous 2012-11-16 16:14

Java
GC is shit.

Name: Anonymous 2012-11-16 16:35

Back to le imagereddits, Herb

Name: Anonymous 2012-11-16 17:11

>>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.

Don't change these.
Name: Email:
Entire Thread Thread List