On 2015-07-14 9:59 AM, Kyle Huey wrote:
On Tue, Jul 14, 2015 at 6:57 AM, Ehsan Akhgari <ehsan.akhg...@gmail.com
<mailto:ehsan.akhg...@gmail.com>> wrote:
On 2015-07-13 3:07 PM, Jeff Gilbert wrote:
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?
Repeating what Kats said elsewhere in the thread which seems to have
been completely ignored in the pile of messages here:
When debugging in a text based debugger such as gdb, sometimes you
have a variable called aFoo which has the wrong value, and with the
existing naming convention, you can quickly run "up" in the
debugger to go to caller frames looking for the first time the
argument is called something without an 'a' prefix, and then you
look to see where the value was computed. If we remove this naming
convention, you would have to do that work in every frame, which
would make debugging the same scenario much more time consuming.
Note that if you mostly use a graphical debugger such as Visual
Studio, you may not rely on this because the debugger would show you
more of the code in each frame, but I believe graphical debuggers
are a niche among Mozilla developers.
That assumes that the 'Foo' of aFoo is stable across function
boundaries, which is not always the case.
No, it doesn't. In the scenario above, all you're looking for is when a
value was computed, so you can quickly see an aDuck, aQuack, aFoopyFoo
and determine that the value was passed down from the caller, until you
get to a call site which passes in something that doesn't start with an 'a'.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform