On 07/07/2015 11:34 PM, Jeff Gilbert wrote:
Outvars are good candidates for having markings in the variable name.
`aFoo` for all arguments is a poor solution for this, though.
On Tue, Jul 7, 2015 at 1:22 PM, smaug <opet...@mozilla.com> wrote:
On 07/07/2015 11:18 PM, Jeff Gilbert wrote:
On Tue, Jul 7, 2015 at 1:03 PM, smaug <opet...@mozilla.com> wrote:
As someone who spends more than 50% of working time doing reviews I'm
strongly against this proposal.
aFoo helps with readability - reader knows immediately when the code is
dealing with arguments.
When and why is this useful to know?
Most common case in Gecko is to know that one is assigning value to
outparam.
Another example where aFoo tends to be rather useful is lifetime management.
If I see aFoo being used somewhere in a method after some unsafe method call
(layout flush, any script callback handling, event dispatch, observer service
notification etc.),
I know that I need to check that the _caller_ follows COM-rules and keeps aFoo
object alive during the method call.
With non-aFoo variables I know the lifetime is controlled within the method.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform