Free and Open Source real time strategy game with a new take on micro-management

Difference between revisions of "Talk:CodingConventions"

From Globulation2

Jump to: navigation, search
(Peer review by nct)
 
 
Line 6: Line 6:


--[[User:Nct|Nct]] 15:48, 19 November 2005 (PST)
--[[User:Nct|Nct]] 15:48, 19 November 2005 (PST)

==GeniXPro's review==

I agree to change numberOfFoo to fooCount. The getter/setter thing I'm against, we should always use get/set foo, the idea is that your not supposed to know how much proccessing is done, the implementation is "abstract" from proccessing amount. So, you shouldn't design your code based on how much time a function takes (I'm not saying write inefficient code or ignore effiency as a matter). That way, if the functions implementation suddenly becomes simpler or more complex, the code that uses it shouldn't have to change to.

--[[User:Genixpro|Genixpro]] 20:38, 26 January 2006 (PST)

Latest revision as of 04:35, 27 January 2006

Steph's review

I fully agree to change numberOfFoo to fooCount, the latter is much better. Funny, in your example of enum you break the "we should not use underscore" convention.

For getter/setter, I think there is more room for discussion, although in principle I tend to agree with you.

--Nct 15:48, 19 November 2005 (PST)

GeniXPro's review

I agree to change numberOfFoo to fooCount. The getter/setter thing I'm against, we should always use get/set foo, the idea is that your not supposed to know how much proccessing is done, the implementation is "abstract" from proccessing amount. So, you shouldn't design your code based on how much time a function takes (I'm not saying write inefficient code or ignore effiency as a matter). That way, if the functions implementation suddenly becomes simpler or more complex, the code that uses it shouldn't have to change to.

--Genixpro 20:38, 26 January 2006 (PST)

Misc