From d1064a60b850d05de82d63f66d7c77616abc2e2a Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Fri, 21 Aug 2015 19:02:09 -0600 Subject: [PATCH] Comment on the function parameter naming. --- 03-Style.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/03-Style.md b/03-Style.md index f75ca11..52b59ea 100644 --- a/03-Style.md +++ b/03-Style.md @@ -27,11 +27,13 @@ Name private data with a `m_` prefix to distinguish it from public data. `m_` st ## Distinguish Function Parameters +The most important thing is consistency within your codebase, this is one possibility to help with consistency. + Name function parameters with an `t_` prefix. `t_` can be thought of as "the", but the meaning is arbitrary. The point is to distinguish function parameters from other variables in scope while giving us a consistent naming strategy. By using `t_` for parameters and `m_` for module data, we can have consistency with both public members of structs and private members of classes. -Any prefix or postfix can be chosen for your organization. This is just one example. This suggestion is controversial, for a discussion about it see issue [#11](https://github.com/lefticus/cppbestpractices/issues/11). +Any prefix or postfix can be chosen for your organization. This is just one example. *This suggestion is controversial, for a discussion about it see issue [#11](https://github.com/lefticus/cppbestpractices/issues/11).* ```cpp struct Size