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

Bad things about C++

Name: Anonymous 2007-03-02 3:10 ID:8GT6+4Q4

Fuck OO. GOTO or GTFO.

Name: Anonymous 2009-01-18 4:26

>>27
1. No, I compiled with gcc with ANSI, returns data has no type or definition error. Point me to a ANSI compliant compiler that accepts it.
2. Same warning is given when compiled with gcc/g++, your point is invalid.
3. See *
4. The old "dont cast return value of malloc" argument, pointers are all uniform size now, there is no more far, long or near pointers anymore, see *, the reason void* existed in the first place is because you could not expect the size of the pointer to be constant.
5. There are no cases where it's useful, see *.

*: Not a problem like I said, you're just nitpicking, hows it useful? Explain and back it up with real production code that uses it.

Out of all 5, only the fifth one is worthy of a argument, and I don't see how it's useful at all, if I wanted to use x, then in C++ I'd simply place it above the goto, if I didn't then the code that uses x could be placed in a if statement. Even then you couldn't give a good argument for it's use. Bad coding pratice doesn't mean it's useful.

int f(int n){
 int x = 0;
 if(n < 0) return 0;
 ...
}

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