You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I brought this up in a phone call a few weeks back. The idea is to have a fairly consistent convention for function signatures mainly, in order to make the code a little more readable. I suggested we use Google's convention, where function arguments that change are positioned to the right of input arguments. This is the convention I've used for most (hopefully all) of my code. However, Mike and Ron tell me that they've been using the opposite convention, where arguments that change are placed on the left. I propose we adopt their ordering convention. I will modify the argument-ordering of the functions Guochun and I have written to make them consistent. Aside from that, I generally pass input arguments that are constant by constant reference, while I use pointers for non-constant arguments. This makes it very easy to distinguish between constant and non-constant function arguments at a glance. I'm not sure what people think of this idea, but I find it quite helpful.
The text was updated successfully, but these errors were encountered:
I brought this up in a phone call a few weeks back. The idea is to have a fairly consistent convention for function signatures mainly, in order to make the code a little more readable. I suggested we use Google's convention, where function arguments that change are positioned to the right of input arguments. This is the convention I've used for most (hopefully all) of my code. However, Mike and Ron tell me that they've been using the opposite convention, where arguments that change are placed on the left. I propose we adopt their ordering convention. I will modify the argument-ordering of the functions Guochun and I have written to make them consistent. Aside from that, I generally pass input arguments that are constant by constant reference, while I use pointers for non-constant arguments. This makes it very easy to distinguish between constant and non-constant function arguments at a glance. I'm not sure what people think of this idea, but I find it quite helpful.
The text was updated successfully, but these errors were encountered: