Talk:Getter and setter policy

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
m
Line 5: Line 5:
 
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)
+
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? I mean might there be exceptions to this rule? --[[User:BenMcDonald|BenMcDonald]] 06:44, 28 July 2009 (UTC)

Revision as of 06:45, 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? I mean might there be exceptions to this rule? --BenMcDonald 06:44, 28 July 2009 (UTC)

Personal tools