Hi

Am 13.07.2015 um 21:07 schrieb Jeff Gilbert:
> On Sun, Jul 12, 2015 at 6:45 PM, Thomas Zimmermann
> <tzimmerm...@mozilla.com <mailto:tzimmerm...@mozilla.com>> wrote:
>
>     Am 08.07.2015 um 16:36 schrieb smaug:
>     > Do you actually have any data how many % of Gecko devs would prefer
>     > not using aFoo?
>
>     I strongly prefer 'aFoo' over 'foo' for the extra context that it
>     gives
>     to the variable. If we want to change anything we should rather
>     introduce a separate prefix for output parameters.
>
>  
> Which part of this extra context is useful?

When writing code, I consider it good style to not write into anything
that starts with an 'a' prefix, except result arguments. Makes the code
cleaner, more readable, and often gives it a clear structure. When
reading the code later on, it's easy to spot the parts of a the code
that directly depend on external parameters by looking for 'a' and 'm'
prefixes. Everything else is helper code or for temporary results.
Longer functions that have 'a's and 'm's all over the place are good
candidates for refactoring.

Best regards
Thomas
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to