[LC++]Names of sets and gets

Peter Poulsen peter_poulsen at stofanet.dk
Sun Jan 18 23:26:02 UTC 2004


Hi

I have been wondering if it would give more or less clear code to call
the sets and gets the same as the variables. E.g.:

class A
{
public:
	void x(int t) { _x = t; }
	int x() { return _x; }
private:
	int _x;
};

I know this purely affects how the code looks, not how it works. What is
your opinion?


-- 
Yours 
Peter Poulsen




More information about the tuxCPProgramming mailing list