Click here to Skip to main content
15,884,629 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: overzealous protection rules Pin
Zac Howland12-Jul-06 6:09
Zac Howland12-Jul-06 6:09 
GeneralRe: overzealous protection rules Pin
Dave Schumann12-Jul-06 6:15
Dave Schumann12-Jul-06 6:15 
GeneralRe: overzealous protection rules Pin
Zac Howland12-Jul-06 6:25
Zac Howland12-Jul-06 6:25 
GeneralRe: overzealous protection rules [modified] Pin
Dave Schumann12-Jul-06 6:48
Dave Schumann12-Jul-06 6:48 
GeneralRe: overzealous protection rules Pin
Zac Howland12-Jul-06 7:05
Zac Howland12-Jul-06 7:05 
AnswerRe: overzealous protection rules Pin
Zac Howland12-Jul-06 5:45
Zac Howland12-Jul-06 5:45 
GeneralRe: overzealous protection rules Pin
Dave Schumann12-Jul-06 6:00
Dave Schumann12-Jul-06 6:00 
GeneralRe: overzealous protection rules Pin
Zac Howland12-Jul-06 6:21
Zac Howland12-Jul-06 6:21 
Dave Schumann wrote:
You've provided public accessors to "value". If I wanted value to be accessible publicly, I'd just make it public.


Which would be even worse.

Dave Schumann wrote:
I'm not putting "protected" in just to make life hard. I actually don't want any outside classes modifying "value". If you make "setValue" protected above - which is the whole point - then you've violated the restrictions I want on "value".


While I'll let you read Meyer's argument for not using protected for yourself, I will point out another glaring point:

Why do you have a pointer to A as a member of class A? From experience, every single time I've seen that type of code, it has been due to poor design. What is it that your larger problem is trying to accomplish?



If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week

Zac
GeneralRe: overzealous protection rules Pin
Dave Schumann12-Jul-06 6:50
Dave Schumann12-Jul-06 6:50 
GeneralRe: overzealous protection rules Pin
Zac Howland12-Jul-06 7:08
Zac Howland12-Jul-06 7:08 
GeneralRe: overzealous protection rules Pin
Dave Schumann12-Jul-06 6:59
Dave Schumann12-Jul-06 6:59 
GeneralRe: overzealous protection rules Pin
Zac Howland12-Jul-06 7:14
Zac Howland12-Jul-06 7:14 
Answersolution Pin
Dave Schumann12-Jul-06 6:04
Dave Schumann12-Jul-06 6:04 
GeneralRe: solution Pin
Dave Schumann12-Jul-06 8:25
Dave Schumann12-Jul-06 8:25 
GeneralRe: solution Pin
BadKarma12-Jul-06 8:58
BadKarma12-Jul-06 8:58 
GeneralRe: solution Pin
led mike12-Jul-06 8:53
led mike12-Jul-06 8:53 
AnswerRe: overzealous protection rules Pin
Rilhas17-Jul-06 13:43
Rilhas17-Jul-06 13:43 
AnswerRe: overzealous protection rules Pin
David Crow31-Jul-06 10:28
David Crow31-Jul-06 10:28 
QuestionA (simple) Shell Question Pin
Dave Kerr12-Jul-06 4:49
Dave Kerr12-Jul-06 4:49 
QuestionLabeling Slider Bar stops Pin
LCI12-Jul-06 4:36
LCI12-Jul-06 4:36 
AnswerRe: Labeling Slider Bar stops Pin
pgrohs12-Jul-06 4:51
pgrohs12-Jul-06 4:51 
GeneralRe: Labeling Slider Bar stops Pin
LCI12-Jul-06 5:51
LCI12-Jul-06 5:51 
GeneralRe: Labeling Slider Bar stops Pin
pgrohs12-Jul-06 6:05
pgrohs12-Jul-06 6:05 
QuestionRightToLeft property Pin
Elbaz Haviv12-Jul-06 3:17
Elbaz Haviv12-Jul-06 3:17 
AnswerRe: RightToLeft property [modified] Pin
includeh1012-Jul-06 3:33
includeh1012-Jul-06 3:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.