what conventions exist organization arguments methods?
a co-worker i deliberating best practices per organization slight parameters. idea settle customary the method provoke readability capability giving the methods common signatures. merely substantiating fortify new grads hiring.
example (userid always upheld review calls):
getorders(string userid, int customerid);
getorders(string userid, int[] orderids);
getcustomer(string userid, int customerid);
my justification following:
- common arguments left most.
- remaining arguments formed importance
- optional (nullable) arguments last.
his justification radically opposite.
i'm seeking right wrong answer here, nor discussion. i only wish standards exist already.
thanks!
Comments
Post a Comment