I use a similar convention now as well. And I wouldn’t have an objection to 
updating the style guide to require this convention, instead. But it seems to 
me that if we’re going to update the style guide to require identifying 
out-params, we may as well use a solution that doesn’t make our code even more 
verbose.

- Seth

> On Dec 5, 2014, at 3:31 PM, Botond Ballo <bba...@mozilla.com> wrote:
> 
> In APZ code, we've been using the prefix 'aOut' for out-parameters. This 
> keeps them consistent with the general rule of "'a' for arguments" while 
> identifying out-parameters with a convention.
> 
> Cheers,
> Botond
> 
> ----- Original Message -----
>> From: "Nicholas Nethercote" <n.netherc...@gmail.com>
>> To: "Robert O'Callahan" <rob...@ocallahan.org>
>> Cc: "dev-platform" <dev-platform@lists.mozilla.org>, "Seth Fowler" 
>> <s...@mozilla.com>
>> Sent: Friday, December 5, 2014 5:10:09 PM
>> Subject: Re: Proposal: Change the coding style guide to allow an 'o' prefix 
>> to       indicate out-params
>> 
>> You sometimes see comments for this, e.g.
>> 
>>  int foo(int aX, /* out */ char* aS);
>> 
>> If we recommended/required this, it might make the interregnum period
>> problem smaller?
>> 
>> Nick
>> 
>> On Fri, Dec 5, 2014 at 1:31 PM, Robert O'Callahan <rob...@ocallahan.org>
>> wrote:
>>> On Fri, Dec 5, 2014 at 12:08 PM, Seth Fowler <s...@mozilla.com> wrote:
>>> 
>>>> Well, converting all existing code to use this convention overnight
>>>> definitely wouldn’t be worth it. And just adding this to the style guide
>>>> will give us very little benefit *right now*. But I think if we add this
>>>> to
>>>> the coding style guide and convert things gradually in a pragmatic fashion
>>>> - when we write new code, when we touch old code that doesn’t use the
>>>> convention, and perhaps when we encounter an unclear method definition in
>>>> the course of our work - a year or two down the road it may be common
>>>> enough that we get significant benefits from the change.
>>>> 
>>> 
>>> The interregnum period creates confusion in the minds of developers, who
>>> for example may not know whether to use "o" per the style guide or "a" to
>>> be consistent with surrounding code. This is a cost. I think in the past
>>> we've underestimated the costs of incomplete transitions in coding style.
>>> 
>>> Rob
>>> --
>>> oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo
>>> owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo
>>> osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo
>>> owohooo
>>> osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o
>>> oioso
>>> oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo
>>> owohooo
>>> osoaoyoso,o o‘oYooouo ofooooolo!o’o owoiololo oboeo oiono odoaonogoeoro
>>> ooofo
>>> otohoeo ofoioroeo ooofo ohoeololo.
>>> _______________________________________________
>>> dev-platform mailing list
>>> dev-platform@lists.mozilla.org
>>> https://lists.mozilla.org/listinfo/dev-platform
>> _______________________________________________
>> dev-platform mailing list
>> dev-platform@lists.mozilla.org
>> https://lists.mozilla.org/listinfo/dev-platform
>> 

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

Reply via email to