On Thu, Dec 4, 2014 at 10:35 AM, Seth Fowler <s...@mozilla.com> wrote:

> I’d like to change the coding style guide to let us make out-params more
> obvious by using an ‘o’ prefix for their name instead of an ‘a’. For
> example,
>
> nsresult Modify(int aCount, size_t aSize, char* oResult);
>
> This will make it clear just from the declaration of a function or method
> which parameters are out-params. XPCOM requires us to use out-params a lot,
> and I’ve found that determining when it’s happening often requires me to
> look at the code for the method, especially since we frequently use pointer
> arguments for efficiency or because the argument is optional.
>
> Seems to me like a substantial gain in readability for little or no cost.


What fraction of these cases can't be distinguished by making non-out
ref/pointer parameters const?

-Ekr
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to