Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++

2015-07-14 Thread Ehsan Akhgari
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

Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++

2015-07-14 Thread Joshua Cranmer 
On 7/14/2015 1:39 AM, Thomas Zimmermann wrote: When writing code, I consider it good style to not write into anything that starts with an 'a' prefix, except result arguments. You should never write into something with an 'a' prefix except when you should, if you simplify it. I've actually

Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++

2015-07-14 Thread Kartikaya Gupta
On Tue, Jul 14, 2015 at 10:10 AM, Tom Tromey ttro...@mozilla.com wrote: That assumes that the 'Foo' of aFoo is stable across function boundaries, which is not always the case. Ehsan No, it doesn't. In the scenario above, all you're looking for is when Ehsan a value was computed, so you can

Switch to Google C++ Style Wholesale (was Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++)

2015-07-14 Thread Benjamin Smedberg
On 7/8/2015 7:31 AM, Nathan Froyd wrote: If somebody is willing to do the formatting, I'm willing to do the review. I think the thread has reached the point of people repeating ad nauseum what was already said earlier in the thread, so it's time for a decision. Benjamin? Aww, I was

Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++

2015-07-14 Thread Ehsan Akhgari
On 2015-07-14 10:10 AM, Tom Tromey wrote: That assumes that the 'Foo' of aFoo is stable across function boundaries, which is not always the case. Ehsan No, it doesn't. In the scenario above, all you're looking for is when Ehsan a value was computed, so you can quickly see an aDuck, aQuack,

Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++

2015-07-14 Thread Ehsan Akhgari
On 2015-07-13 3:07 PM, Jeff Gilbert wrote: On Sun, Jul 12, 2015 at 6:45 PM, Thomas Zimmermann 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

Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++

2015-07-14 Thread Kyle Huey
On Tue, Jul 14, 2015 at 6:57 AM, Ehsan Akhgari 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 wrote: Am 08.07.2015 um 16:36 schrieb smaug: Do you actually have any data how many % of

Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++

2015-07-14 Thread Thomas Zimmermann
Hi Am 14.07.2015 um 16:19 schrieb Joshua Cranmer : On 7/14/2015 1:39 AM, Thomas Zimmermann wrote: When writing code, I consider it good style to not write into anything that starts with an 'a' prefix, except result arguments. You should never write into something with an 'a' prefix except

Re: Switch to Google C++ Style Wholesale (was Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++)

2015-07-14 Thread Joshua Cranmer 
On 7/14/2015 10:23 AM, Benjamin Smedberg wrote: Given that premise, we shouldn't just change aArgument; we should adopt the Google C++ style guide wholesale: * names_with_underscores The biggest problem here is that WebIDL and XPIDL codegen are heavily geared towards camelCase names, as the

Re: Switch to Google C++ Style Wholesale (was Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++)

2015-07-14 Thread David Major
May I request that the major parts of this not happen until we have a blame that can see through such changes. Last I checked, gps had some ideas in that space but lacked time to implement. On Wed, Jul 15, 2015, at 03:23 AM, Benjamin Smedberg wrote: On 7/8/2015 7:31 AM, Nathan Froyd wrote:

Re: Switch to Google C++ Style Wholesale (was Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++)

2015-07-14 Thread Seth Fowler
On Jul 14, 2015, at 8:23 AM, Benjamin Smedberg benja...@smedbergs.us wrote: * no more ns prefix Are people still creating new classes with an ’ns’ prefix? Surely this is something we can drop right away, at least for new code. Much of the codebase already does not use this style. We have

Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++

2015-07-14 Thread Kartikaya Gupta
(and 600+ plus of those are from my objdirs, actually). Here it is broken down by dir: kats@kgupta-air mozilla-git$ find . -type d -maxdepth 1 -mindepth 1 | grep -v .git | while read dir; do pushd $dir /dev/null; find . -name *.cpp | xargs grep ^ *a[A-Z]\w* = | wc -l | xargs echo $dir; popd

Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++

2015-07-14 Thread L. David Baron
On Tuesday 2015-07-14 10:27 -0400, Kartikaya Gupta wrote: Admittedly not perfect, but as a first-order approximation: kats@kgupta-air mozilla-git$ find . -name *.cpp | xargs grep ^ *a[A-Z]\w* = | wc -l 5414 That's not a lot considering the size of the codebase. And a decent portion

Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++

2015-07-14 Thread Thomas Zimmermann
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

Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++

2015-07-14 Thread Tom Tromey
That assumes that the 'Foo' of aFoo is stable across function boundaries, which is not always the case. Ehsan No, it doesn't. In the scenario above, all you're looking for is when Ehsan a value was computed, so you can quickly see an aDuck, aQuack, Ehsan aFoopyFoo and determine that the value

Re: Switch to Google C++ Style Wholesale (was Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++)

2015-07-14 Thread Gregory Szorc
On Tue, Jul 14, 2015 at 9:06 AM, David Major dma...@mozilla.com wrote: May I request that the major parts of this not happen until we have a blame that can see through such changes. Last I checked, gps had some ideas in that space but lacked time to implement. I spoke to a Mercurial

Re: Switch to Google C++ Style Wholesale (was Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++)

2015-07-14 Thread Martin Thomson
On Tue, Jul 14, 2015 at 10:06 AM, Gregory Szorc g...@mozilla.com wrote: That being said, every other organizations in the world is using the same or similar tools and is faced with similar challenges. Lack of a commit-skipping feature doesn't hinder other organizations from performing major

Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++

2015-07-14 Thread Karl Tomlinson
Tom Tromey writes: It was mentioned elsewhere in this thread that some code assigns to arguments. The style guide should clarify that parameters named aFoo should not be assigned to. Otherwise that defeats the purpose. Non-const references are the exception. If these are really needed, then

Re: Switch to Google C++ Style Wholesale (was Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++)

2015-07-14 Thread Robert O'Callahan
On Wed, Jul 15, 2015 at 3:40 AM, Joshua Cranmer  pidgeo...@gmail.com wrote: The biggest problem here is that WebIDL and XPIDL codegen are heavily geared towards camelCase names, as the IDL convention is camelCase. C++ names matching WebIDL (or spec names in general) has value. We've gotten

Intent to ship Service Worker Notification API

2015-07-14 Thread nsm . nikhil
Hello, Target release: Firefox 42 Implementation and shipping bug: https://bugzilla.mozilla.org/buglist.cgi?quicksearch=1114554 Specification: https://notifications.spec.whatwg.org/#service-worker-api This is a follow up to the Notification API on worker support that landed in Firefox 41 [1].

Re: Intent to implement W3C Manifest for web application

2015-07-14 Thread marcos
(Please kindly cc me if you want my attention in this thread. I don't subscribe to mailing lists.) On Friday, April 18, 2014 at 7:22:56 AM UTC+10, Marcos Caceres wrote: Summary:   JSON-based manifest, which provides developers with a centralized place to put metadata associated with a web

Re: Should the entire JS structure be Object.freeze()'d if it's exposed through a read only property?

2015-07-14 Thread Boris Zbarsky
On 7/13/15 2:40 AM, Tim Guan-tin Chien wrote: In that case, the right question to ask would be (A) should DOMApplication#manifest be a recursive frozen JS structure Is it a plain vanilla object with nothing hanging off it that has getter/setters? If so, that would not be unreasonable. and

Re: Intent to implement W3C Manifest for web application

2015-07-14 Thread Martin Thomson
I'd rather see us solve the individual problems that manifests aim to solve using some combination of meta tags, link relations and plain-ol' DOM/JS APIs. The manifest is no better than the former two. It already replicates features that these provide when it comes to icons. In particular, the

Re: Switch to Google C++ Style Wholesale (was Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++)

2015-07-14 Thread Birunthan Mohanathas
On 14 July 2015 at 08:23, Benjamin Smedberg benja...@smedbergs.us wrote: The argument I am most sympathetic to is that this convention is a barrier to new contributors. Making new contributors productive, both employees and volunteers, is a very good reason to choose one style over another.

Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++

2015-07-14 Thread Robert O'Callahan
On Wed, Jul 15, 2015 at 2:55 AM, Thomas Zimmermann tzimmerm...@mozilla.com wrote: The discussion has a number of good points in favor of using 'a', but I missed convincing arguments in favor of not using 'a'. Are there any? I don't consider I don't get what 'a' is good for a convincing

Re: Switch to Google C++ Style Wholesale (was Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++)

2015-07-14 Thread Bobby Holley
I'm not wild about this idea. Switching styles entirely would be several times more churn and work than just making our existing codebase conform to our existing style guide. Consistency with Google's style might be a nice bonus, and there might be subjective arguments for one or the other, but

Re: Intent to implement W3C Manifest for web application

2015-07-14 Thread Anne van Kesteren
On Wed, Jul 15, 2015 at 12:00 AM, mar...@marcosc.com wrote: * It's not clear what problems manifest solves This is by far the biggest problem. I think we ended up with manifests because packages have manifests and iOS/Android use packages for applications, but none of that translates well to

Re: Switch to Google C++ Style Wholesale (was Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++)

2015-07-14 Thread Nicholas Nethercote
On Tue, Jul 14, 2015 at 8:06 PM, Bobby Holley bobbyhol...@gmail.com wrote: I'm not wild about this idea. It's such a boil-the-ocean solution I honestly thought bsmedberg was joking at first... Nick ___ dev-platform mailing list

Re: Switch to Google C++ Style Wholesale (was Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++)

2015-07-14 Thread Kyle Huey
On Tue, Jul 14, 2015 at 8:23 AM, Benjamin Smedberg benja...@smedbergs.us wrote: On 7/8/2015 7:31 AM, Nathan Froyd wrote: If somebody is willing to do the formatting, I'm willing to do the review. I think the thread has reached the point of people repeating ad nauseum what was already said

Re: Switch to Google C++ Style Wholesale (was Re: Proposal to remove `aFoo` prescription from the Mozilla style guide for C and C++)

2015-07-14 Thread smaug
On 07/14/2015 08:11 PM, Martin Thomson wrote: On Tue, Jul 14, 2015 at 10:06 AM, Gregory Szorc g...@mozilla.com wrote: That being said, every other organizations in the world is using the same or similar tools and is faced with similar challenges. Lack of a commit-skipping feature doesn't hinder