C++ makes me cry.

Started by
43 comments, last by daerid 19 years, 6 months ago
Quote:Original post by Washu
Quote:Original post by daerid
Good god man, haven't you ever heard of typedef?

Ooh! ooh! I have, can I have a cookie now?

Seriously though. The use of lowercase names and such had nothing to do with 80x25 displays.


Quite so - in fact, at my workplace, we use 80x25 terminals for all our cashier stations (it's a toystore) off a crappy SCO server (originally a Zenix box, but support for that has been dropped now - and even the support for SCO is majorly lacking). The company that supplies our software now contains a whole two people, one of which we're constantly calling up for bug reports, and asking him to implement features which are allready in our menus but bring up "Unimplemented" messages whenever we try to use them.

The older version of the software (v4, which was non Y2K compliant, which we used until early 2004 IIRC) used ALL CAPS in many cases, and if you happened to mistype the software's entry command ("GO") there were a few variations that made EVERYTHING RUN IN ALL CAPS.

However, both our lineprinters and our old IBM3151 terminals supported both uppercase and lowercase. It's all about syntax and stuff.

I like the STL's naming convention of all lowercase because it fits with the builtin types (int, char, etc). But to each his own I guess...

oh yeah, and to the rest of you: please, don't turn this into another C++ vs C# flamewar please. Just hate C++ here ;-)
Advertisement
Quote:Original post by darookie
I understand that in your world being a good programmer implies being a C++ wizard.


No... you don't seem to understand at all. I will try one more time.

If you don't understand how to use pointers (as opposed to choosing not to use them because you prefer something else), then the proper solution is to figure it out, not to escape to some language where it's less applicable.

It's the same with char* in C and string in C++. If you use string because you don't understand the alternative then it's a crutch and you're hurting yourself in the long run. If you use it because it saves you time then that's a completely different matter.
Quote:Original post by Jingo
Quote:Original post by alnite
Quote:Original post by petewood
Quote:Original post by alnite
I allocate/deallocate objects in one place, and pass constant pointers around (to prevent unintended deallocation).


It's okay to delete a constant pointer.

Oh, I was talking about pointers to constant objects.


Its ok to delete pointers to constant objects..


heh
Quote:Original post by bobstevens
Quote:Original post by darookie
I understand that in your world being a good programmer implies being a C++ wizard.


No... you don't seem to understand at all. I will try one more time.

If you don't understand how to use pointers (as opposed to choosing not to use them because you prefer something else), then the proper solution is to figure it out, not to escape to some language where it's less applicable.

It's the same with char* in C and string in C++. If you use string because you don't understand the alternative then it's a crutch and you're hurting yourself in the long run. If you use it because it saves you time then that's a completely different matter.

And again you focus your claims on C-like languages. There are languages that do not have a concept of pointer arithmetic (like Eiffel). C and C++ are mid-level languages period. Pointer arithmetic is a low level thing and if one chooses not wanting to deal with it and all the implied hassles, it's a matter of choosing a higher level tool to achieve the goal.

Besides the char* example is a praticulary bad one. You can always regard it an array. Which means indices will do. In fact, CPU manufactures strongly discourage the use of pointer arithmetic these days.

To sum it up - with regards to C and C++ I fully agree with you. Understanding pointers is a must. But there are languages that don't have them and thus they are not part of the whatsoever alternatives to choose from.

Regards,
Pat.
Quote:Original post by Oluseyi
Quote:Original post by daerid
Because you can also declare an instance in the same statement?
Did you want chocolate chip or macadamia nut? Cookie, that is?


I'll take the Oatmeal Raisin, please.
daerid@gmail.com

This topic is closed to new replies.

Advertisement