Talk:Getter and setter policy

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
Line 4: Line 4:
  
 
Very nice little style guide there, I would back that 100% --[[User:AlexGee|AlexGee]] 02:09, 28 July 2009 (UTC)
 
Very nice little style guide there, I would back that 100% --[[User:AlexGee|AlexGee]] 02:09, 28 July 2009 (UTC)
 +
 +
If the object has to call its getters and settings to change its own variables then changes to the variables internally would be subjected to the same constraints as calls through the public interface. This also would mean that internal calls would always have the same constraints as public calls. Would you want this? --[[User:BenMcDonald|BenMcDonald]] 06:44, 28 July 2009 (UTC)

Revision as of 06:44, 28 July 2009

Don't tell me everyone agrees where is the fun in that?

I just have to completely agree with the first paragraph. I also try to always use this->FunctionName() to make the difference between internal and external function calls clear. Python, for instance, enforces such a syntax ( self.FunctionName() ). --TobiW

Very nice little style guide there, I would back that 100% --AlexGee 02:09, 28 July 2009 (UTC)

If the object has to call its getters and settings to change its own variables then changes to the variables internally would be subjected to the same constraints as calls through the public interface. This also would mean that internal calls would always have the same constraints as public calls. Would you want this? --BenMcDonald 06:44, 28 July 2009 (UTC)