strings

Started by
43 comments, last by Kazade 15 years, 9 months ago
I don't want to start a flame war. Everyone else thinks private member variables are useful and I am happy for them. I learned everything I need to know about strings thanks for the help everyone I am done with this thread.
Advertisement
Quote:Original post by icecubeflower
I don't want to start a flame war. Everyone else thinks private member variables are useful and I am happy for them.


Well I wish you luck in securing employment with those views lol
Quote:Original post by icecubeflower
I don't want to start a flame war. Everyone else thinks private member variables are useful and I am happy for them. I learned everything I need to know about strings thanks for the help everyone I am done with this thread.
It's not a flame war just because people don't agree with you.
There are many cases where private variables aren't just "nice" but required. Here's a simple one: you need to know every time your player's health is reset.

Quote:Original post by d000hg
There are many cases where private variables aren't just "nice" but required. Here's a simple one: you need to know every time your player's health is reset.


This can also be achieved with the pimpl idiom, or any other of the various techniques used to implement data hiding without private access specifiers.

Ultimately, the question here is whether the OP believes data hiding is pointless, or whether he believes that private variables are an inadequate way of achieving data hiding.

And it's perfecty true that idiomatic C can achieve data hiding better than idiomatic C++ can, even though it doesn't have private access specifiers. If that was the OP's point, then I'd agree with him insofar as the C language is concerned, and would actually disagree with him on his attempts to use C++ as if it were C. Either way, I would consider him for employment as a C programmer (perhaps even senior), but not anything more than an internship in C++ (if at all) simply because he's not familiar enough with (or keen on using) the idioms and techniques of the C++ language.
Quote:Original post by icecubeflower
Probably I am C-centric. Once I blew an interview I think because I said private member variables were useless. (they are) I think it gave the kid interviewing me a heart attack.


Oh dear god...

You need this book.

Especially item 22. [smile]
Member of the NeHe team.

This topic is closed to new replies.

Advertisement