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

Random things that piss you off about C++

Name: Anonymous 2004-12-31 9:02

I hate how function declarations and function definitions usually don't look the same. For example

Declaration:
virtual void doShit()

Definition:
void MyNamespace::MyClass::doShit()

Name: Anonymous 2007-03-15 17:50 ID:Jw6QZtCm

function declarations and function definitions usually don't look the same
"using" is your friend.

Java owns teh sky
Java is crippled C++, it owns nothing.

Everything that isn't inline should be virtual by default
Moron. C++ has been designed so that your speed is not affected by features you don't use! virtual tables are too slow for some stuff. Everything that is not inline should not be virtual unless you need it!

Having to keep my headers and cpp files in sync when I change function argument lists
Interfaces are not meant to be changed once they are stable. Rewrite your shitty code instead.

polymorphism is over-rated.  most people only use classes as a group of functions and fields
Just because people don't know how to use classes, polymorphism is overrated? You're another moron.

it's really just a convienence for the programmer
Dynamically allocated objects are just a convenience? You don't get it, do you?

It's not that iostream is broken, it's just plain ugly. And inconsistent
Ugly? No. Inconsistent? Where?

I switched to Java
You fail.

No prototypes
Enjoy your lack of features. Oh, I heard they cloned the template system, maybe next you'll have some pointers and multiple inheritance to play with.

What is void foo() = 0 supposed to mean?
It's a pure virtual method, it's in all the books.

You aren't allowed (...)
Yes you are.

D [is] suitable for everything from device drivers to enterprise scale applications
I hope this is a joke.

Name: Anonymous 2007-03-15 18:07 ID:F6tSDzbB

>>35
D [is] suitable for everything from device drivers to enterprise scale applications
Not yet it isn't.

It's a fantastic language (it really is!), and continues to improve at a dramatic pace, but it's immature. I'd only use it for personal projects at the moment.

Maybe in a couple more years.

Name: Anonymous 2007-07-05 6:56 ID:5HcRXN87

What I hate about C++ is templates, they need *proper* macros like scheme has.

Name: Anonymous 2007-07-05 7:43 ID:MxW0Sx/J

>>39

Learn to std::wstring, you moron.

Name: GJSussman !xpQSO2ECEY 2008-02-12 7:21

Sagetesting the Sussman.

Name: Anonymous 2008-02-13 18:42

>>45
SUSSMAN SIGHTING

Name: Anonymous 2008-03-04 13:01

>>46
Way to bump a four years old thread, jerk.

Name: Anonymous 2008-03-04 13:06

>>1
lol sepples

Name: Anonymous 2008-03-04 14:00

>>40
I HATE HOW THE TAB KEY DOESNT GIVE ME COFFEE...
(global-set-key "\t" 'coffee-mode)

Name: Anonymous 2008-03-04 14:17

Name: Anonymous 2008-03-04 14:27

>>50
your a /g/-going fag bitch

Name: Anonymous 2008-03-04 14:30

>>51
your

Name: Anonymous 2008-03-04 14:38

your

Name: Anonymous 2008-03-04 14:43

>>49
Don't bother, he seems like a VIMMER to me.

Name: Anonymous 2008-03-04 15:20

this is now a zimmer thread

Name: Anonymous 2008-03-04 18:01

>>22
I wouldn't, instead of wasting money on gold boullion tp i'd waste it on buying a country and building a secret underground evil lair, the nerd/geek/whatever they call us now's wet dream.

Name: Anonymous 2008-03-04 18:09

>>52
>>53
yes, that was intentional, u fag bitches

Name: Anonymous 2008-03-04 18:10

It's not LR.

Fucking language.

Name: Anonymous 2008-03-04 18:21

>>40
Seconded.

I'm too new to C++ to find many flaws.
I was writing code and there must've been some bad error in it, because when I ran it my computer locked up.

I was fooling with srand and dice roll forumale.

Name: Anonymous 2008-03-04 18:23

Holy shit. Old thread is fucking old.

Name: Anonymous 2008-03-04 18:50

>>57
kekekekeke

Name: Anonymous 2008-03-04 20:15

>>15
>..is so bloated and illegible that if I ever try to write the same thing again it ends up bluescreening my computer.

god damn winfags

Name: Anonymous 2008-03-04 21:27

If you can't use strcpy, memset, memcpy, malloc, free etc. without causing segfaults and you're not a noob to programming CONGRAGULATIONS YOU ARE A FUCKING RETARD!!!

Seriously don't ever use any programming language ever again.

Name: Anonymous 2008-03-04 23:48

If you can't use MOV, Jcc, STOSB, CMP, STI, FADD etc. without causing double exceptions and you're not noob to programming CONGRAGULATIONS YOU ARE A FUCKING RETARD!!!

Seriously don't ever use any programming language ever again.

Name: Anonymous 2008-03-05 0:52

>>63,64
It's not that I can't do those things, it's just that I can do more work with less effort with a real language.

Name: Anonymous 2008-03-05 11:00

>>62
Don't like Windows? What's the matter? Too REAL OS for you?

Name: Anonymous 2008-03-05 12:01

>>66
Too desktop-ready for me.

Name: Anonymous 2008-03-05 16:55

>>65
createWindowsEx(hWnd, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

Name: Anonymous 2008-03-05 17:09

>>68
nullExNull(NULL, NULL, NULL, CREATE, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, HWND, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, WINDOWS, NULL, NULL);

Name: Anonymous 2009-03-06 6:15

The day to use   and gives results   fast Shit some   nice large arrays   on it because   it wont work   Do it yourself   to Eastern Enlightenment.

Name: Anonymous 2010-10-02 18:59

OOP in general

Name: Anonymous 2010-10-02 22:53

>>69
NULL(NULL, NULL, NULL, CREATE, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, EX, NULL, NULL, NULL, NULL, NULL, HWND, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, WINDOWS, NULL, NULL, NULL, NULL);

Name: Anonymous 2010-10-03 1:57

>>72
Needs more 0 and INVALID_HANDLE and sizeof(DWORD).

Name: Anonymous 2010-10-03 6:40

>>68

You don't use NULL in sepples, you use 0, or nullptr in Sepples0x.

Name: Anonymous 2010-10-03 10:04

>>74
Really? That's disgusting, what the hell was wrong with NULL? Too uppercase?

Writing 0 is mega bad, because it makes it impossible to tell at a glance that something is supposed to be a pointer type. With NULL, a variable, or an explicitly-cast direct memory location, it's plainly obvious that it isn't just an integer.

Name: Anonymous 2010-10-03 10:12

How do you think, is OP still alive?

Name: Anonymous 2010-10-03 13:43

>>75
If you're not aware of the type of the variable you're assigning to, you've got more problems than how the null pointer is written.

Name: Anonymous 2010-10-03 14:14

>>77
I'm referring to function calls, not plain assignments, and I think you are vastly underestimating the usefulness of a special keyword or macro to identify a pointer type.

Suppose you have a function mutate() which takes an array, its size, a scalar value to multiply each value, and maybe another array with which to perform an entry-wise sum. You know that with this particular API, which with you are only passingly familiar, that its functions all take an array and size as the first parameter, but beyond that, the parameters are less well-defined.

Now, if you see this function being used once as:
int x[4] = {29, 315, 4929, 0};
mutate(x, 4, 0, NULL);

then you will be able to figure out that it's basically zeroing out the array. (Admittedly, this is a rather pedantic example, but suppose the values were not plain integers but rather some special type which could not simply be cleared out with memset, or perhaps this is running on special hardware where such an operation is faster than memset, etc.) Given your passing familiarity with the nature of the function, if you needed later to use this function to perform a scalar multiply, you could write mutate(x, 4, 6, NULL); and it would function as expected.

If, on the other hand, the code used 0 haphazardly instead of NULL like it should, you would be faced with the visually ambiguous mutate(x, 4, 0, 0); and you would need to either stop and look up the documentation or hunt around for the declaration in the header files (which, depending on the complexity of the system and the adequacy of the documentation, might prove to be a time-consuming task), or make a random guess at whether the first or second 0 was the pointer type.

Name: Anonymous 2010-10-03 19:19

>>75
If NULL is defined as ((void*)0) like in C, doesn't work in Sepples as void* can't be implicitly converted to other pointer types. Nowadays any decent implementation has it as defined as 0, though. And 0x is getting nullptr so all's good.

>>78
Or you could just mouseover mutate.

Name: Anonymous 2010-10-03 21:04

>>79
Or you could just mouseover mutate.
Over-reliance on a crutch provided by IDEs is absolutely no excuse for bad code. Next are you going to try arguing that no one should indent their code because you can bounce between brackets?

Also I just realized that I'm arguing with a Sepples programmer. IHBT

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