Re: Coding style: Making the `e` prefix for enum variants not mandatory?

2018-07-07 Thread Emilio Cobos Álvarez
On 7/6/18 8:21 PM, Ehsan Akhgari wrote: On Fri, Jun 29, 2018 at 2:36 PM, smaug wrote: On 06/29/2018 05:58 PM, Boris Zbarsky wrote: On 6/29/18 10:30 AM, Nathan Froyd wrote: Given the language-required qualification for `enum class` and a more Rust-alike syntax, I would feel comfortable w

Re: Coding style: Making the `e` prefix for enum variants not mandatory?

2018-07-06 Thread Ehsan Akhgari
On Fri, Jun 29, 2018 at 2:36 PM, smaug wrote: > On 06/29/2018 05:58 PM, Boris Zbarsky wrote: > >> On 6/29/18 10:30 AM, Nathan Froyd wrote: >> >>> Given the language-required qualification for >>> `enum class` and a more Rust-alike syntax, I would feel comfortable >>> with saying CamelCase `enum c

Re: Coding style: Making the `e` prefix for enum variants not mandatory?

2018-06-29 Thread Jeff Gilbert
I don't believe e-prefix adds sufficient value. Mutable statics *must* always be s-prefixed. If this is not the case I will gladly bring the codebase into compliance. On Fri, Jun 29, 2018 at 11:36 AM, smaug wrote: > On 06/29/2018 05:58 PM, Boris Zbarsky wrote: >> >> On 6/29/18 10:30 AM, Nathan Fr

Re: Coding style: Making the `e` prefix for enum variants not mandatory?

2018-06-29 Thread smaug
On 06/29/2018 05:58 PM, Boris Zbarsky wrote: On 6/29/18 10:30 AM, Nathan Froyd wrote: Given the language-required qualification for `enum class` and a more Rust-alike syntax, I would feel comfortable with saying CamelCase `enum class` is the way to go. For what it's worth, I agree.  The point

Re: Coding style: Making the `e` prefix for enum variants not mandatory?

2018-06-29 Thread Jean-Yves Avenard
On 29/06/2018 16:58, Boris Zbarsky wrote: On 6/29/18 10:30 AM, Nathan Froyd wrote: Given the language-required qualification for `enum class` and a more Rust-alike syntax, I would feel comfortable with saying CamelCase `enum class` is the way to go. For what it's worth, I agree.  The point o

Re: Coding style: Making the `e` prefix for enum variants not mandatory?

2018-06-29 Thread Boris Zbarsky
On 6/29/18 10:30 AM, Nathan Froyd wrote: Given the language-required qualification for `enum class` and a more Rust-alike syntax, I would feel comfortable with saying CamelCase `enum class` is the way to go. For what it's worth, I agree. The point of the "e" prefix is to highlight that you ha

Re: Coding style: Making the `e` prefix for enum variants not mandatory?

2018-06-29 Thread Nathan Froyd
On Thu, Jun 28, 2018 at 7:35 PM, Emilio Cobos Álvarez wrote: > Oh, I didn't realize that those peers were the only ones to be able to > update the style guide, sorry. I guess it makes sense. > > I can revert the change if needed and try to get sign-off from some of > those. > > Apologies again, I

Re: Coding style: Making the `e` prefix for enum variants not mandatory?

2018-06-28 Thread Emilio Cobos Álvarez
On 6/29/18 12:15 AM, Mike Hommey wrote: On Thu, Jun 28, 2018 at 05:27:23PM +0200, Emilio Cobos Álvarez wrote: I asked kats@ (which added the list item regarding enums) and he was fine removing it from the coding style, so given that and the rest of the thread I've edited the page accordingly.

Re: Coding style: Making the `e` prefix for enum variants not mandatory?

2018-06-28 Thread Mike Hommey
On Thu, Jun 28, 2018 at 05:27:23PM +0200, Emilio Cobos Álvarez wrote: > I asked kats@ (which added the list item regarding enums) and he was fine > removing it from the coding style, so given that and the rest of the thread > I've edited the page accordingly. Not that I'd oppose, but I'll note tha

Re: Coding style: Making the `e` prefix for enum variants not mandatory?

2018-06-28 Thread Emilio Cobos Álvarez
I asked kats@ (which added the list item regarding enums) and he was fine removing it from the coding style, so given that and the rest of the thread I've edited the page accordingly. Cheers, -- Emilio On 6/26/18 2:46 AM, Jeff Gilbert wrote: If we can't agree, it shouldn't be in the style g

Re: Coding style: Making the `e` prefix for enum variants not mandatory?

2018-06-25 Thread Jeff Gilbert
If we can't agree, it shouldn't be in the style guide. On Mon, Jun 25, 2018 at 2:17 PM, Peter Saint-Andre wrote: > And perhaps good reason for removing it from the style guide? ;-) > > On 6/25/18 3:08 PM, Emilio Cobos Álvarez wrote: >> And Kris pointed out that we already had another huge thread

Re: Coding style: Making the `e` prefix for enum variants not mandatory?

2018-06-25 Thread Peter Saint-Andre
And perhaps good reason for removing it from the style guide? ;-) On 6/25/18 3:08 PM, Emilio Cobos Álvarez wrote: > And Kris pointed out that we already had another huge thread on this: > > > https://groups.google.com/d/msg/mozilla.dev.platform/WAuySoTfq_w/-DggRotpBQAJ > > > Looks like there w

Re: Coding style: Making the `e` prefix for enum variants not mandatory?

2018-06-25 Thread Emilio Cobos Álvarez
And Kris pointed out that we already had another huge thread on this: https://groups.google.com/d/msg/mozilla.dev.platform/WAuySoTfq_w/-DggRotpBQAJ Looks like there wasn't agreement on that one... But oh well, don't want to repeat a lot of that discussion. I think the argument for consistenc

Coding style: Making the `e` prefix for enum variants not mandatory?

2018-06-25 Thread Emilio Cobos Álvarez
Our coding style states that we should use an `e` prefix for enum variants, that is: enum class Foo { eBar, eBaz }; We're not really consistent about it: looking at layout/, we mostly use CamelCase, though we do have some prefixed enums. Looking at other modules, enum classes almost never u