Re: snake_case C++ in m-c (was: Re: C++ Core Guidelines)

2016-08-16 Thread Henri Sivonen
On Tue, Aug 16, 2016 at 2:19 PM, Henri Sivonen wrote: >> For GSL polyfills, I think that we should continue to follow the MFBT >> conventions set thus far and use Gecko style for naming. > > OK. I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1295611 to request mozilla::Span in MFBT. -- He

Re: snake_case C++ in m-c (was: Re: C++ Core Guidelines)

2016-08-16 Thread Henri Sivonen
On Mon, Aug 15, 2016 at 10:30 PM, Nathan Froyd wrote: > On Mon, Aug 15, 2016 at 9:56 AM, Henri Sivonen wrote: >> Relatedly, on the topic of MFBT Range and GSL, under the subject "C++ >> Core Guidelines" Jim Blandy wrote: >>> One of the main roles of MFBT is

Re: snake_case C++ in m-c (was: Re: C++ Core Guidelines)

2016-08-15 Thread Jim Blandy
On Mon, Aug 15, 2016 at 11:59 AM, Bobby Holley wrote: > On Mon, Aug 15, 2016 at 11:53 AM, Henri Sivonen > wrote: > >> What I'm asking is: >> >> When I take encoding_rs_cpp.h and adapt it to XPCOM/MFBT types for use >> in Gecko, should this be >> Encoding::for_label(const nsACString& label) // ch

Re: snake_case C++ in m-c (was: Re: C++ Core Guidelines)

2016-08-15 Thread Henri Sivonen
On Aug 15, 2016 21:59, "Bobby Holley" wrote: > > On Mon, Aug 15, 2016 at 11:53 AM, Henri Sivonen wrote: >> >> On Mon, Aug 15, 2016 at 6:45 PM, Jim Blandy wrote: >> > We're using Cheddar to produce C headers for our Rust mp4parse crate; as far >> > as I can see, Cheddar doesn't mangle Rust names.

Re: snake_case C++ in m-c (was: Re: C++ Core Guidelines)

2016-08-15 Thread Nathan Froyd
On Mon, Aug 15, 2016 at 9:56 AM, Henri Sivonen wrote: > Relatedly, on the topic of MFBT Range and GSL, under the subject "C++ > Core Guidelines" Jim Blandy wrote: >> One of the main roles of MFBT is to provide polyfills for features >> standardized in C++ that we

Re: snake_case C++ in m-c (was: Re: C++ Core Guidelines)

2016-08-15 Thread Bobby Holley
On Mon, Aug 15, 2016 at 11:53 AM, Henri Sivonen wrote: > On Mon, Aug 15, 2016 at 6:45 PM, Jim Blandy wrote: > > We're using Cheddar to produce C headers for our Rust mp4parse crate; as > far > > as I can see, Cheddar doesn't mangle Rust names. > > > > The Mozilla C++ style applies only to identi

Re: snake_case C++ in m-c (was: Re: C++ Core Guidelines)

2016-08-15 Thread Henri Sivonen
On Mon, Aug 15, 2016 at 6:45 PM, Jim Blandy wrote: > We're using Cheddar to produce C headers for our Rust mp4parse crate; as far > as I can see, Cheddar doesn't mangle Rust names. > > The Mozilla C++ style applies only to identifiers defined in Mozilla's C++ > code base, not things that we merely

Re: snake_case C++ in m-c (was: Re: C++ Core Guidelines)

2016-08-15 Thread Bobby Holley
ake_case, so for a > >> C++ interface to a Rust library outside of the Gecko context, it's not > >> unnatural to use snake_case methods on the C++ layer, too. Like this: > >> https://github.com/hsivonen/encoding_rs/blob/master/include/ > >> encoding_rs_cpp.h >

Re: snake_case C++ in m-c (was: Re: C++ Core Guidelines)

2016-08-15 Thread Jim Blandy
encoding_rs_cpp.h >> >> Since Gecko has does not use C++ standard-library strings and, at >> least currently, does not use GSL, a slightly different C++ wrapper is >> called for in the Gecko case. >> >> But should such a wrapper just use XPCOM nsACString and MFBT

Re: snake_case C++ in m-c (was: Re: C++ Core Guidelines)

2016-08-15 Thread Jim Blandy
strings and, at > least currently, does not use GSL, a slightly different C++ wrapper is > called for in the Gecko case. > > But should such a wrapper just use XPCOM nsACString and MFBT Range or > should it also change the names of the methods to follow Gecko case > rules? > >

snake_case C++ in m-c (was: Re: C++ Core Guidelines)

2016-08-15 Thread Henri Sivonen
y, does not use GSL, a slightly different C++ wrapper is called for in the Gecko case. But should such a wrapper just use XPCOM nsACString and MFBT Range or should it also change the names of the methods to follow Gecko case rules? Relatedly, on the topic of MFBT Range and GSL, under the su

Re: C++ Core Guidelines

2016-07-15 Thread Jim Blandy
Given GSL's pedigree, I was assuming that we'd bring it in-tree and switch out MFBT facilities with the corresponding GSL things as they became available. One of the main roles of MFBT is to provide polyfills for features standardized in C++ that we can't use yet for toolchain reasons (remember MO

Re: C++ Core Guidelines

2016-07-15 Thread Henri Sivonen
On Thu, Mar 24, 2016 at 6:01 PM, Jeff Muizelaar wrote: > On Wed, Jan 6, 2016 at 7:15 AM, Henri Sivonen wrote: >> On Thu, Oct 1, 2015 at 9:58 PM, Jonathan Watt wrote: >>> For those who are interested in this, there's a bug to consider integrating >>> the Guidelines Support Library (GSL) into the

Re: C++ Core Guidelines

2016-03-24 Thread Jeff Muizelaar
On Wed, Jan 6, 2016 at 7:15 AM, Henri Sivonen wrote: > On Thu, Oct 1, 2015 at 9:58 PM, Jonathan Watt wrote: >> For those who are interested in this, there's a bug to consider integrating >> the Guidelines Support Library (GSL) into the tree: >> >> https://bugzilla.mozilla.org/show_bug.cgi?id=1208

Re: C++ Core Guidelines

2016-01-14 Thread Henri Sivonen
On Wed, Jan 13, 2016 at 12:53 AM, Ehsan Akhgari wrote: > I'll investigate integrating gsl-lite into m-c. Thank you. On Mon, Jan 11, 2016 at 10:03 PM, Brian Smith wrote: > mozilla::pkix::Input/Reader will never throw an exception or abort the > process; instead it always returns an explicit succ

Re: C++ Core Guidelines

2016-01-12 Thread Ehsan Akhgari
On 2016-01-06 7:15 AM, Henri Sivonen wrote: On Thu, Oct 1, 2015 at 9:58 PM, Jonathan Watt wrote: For those who are interested in this, there's a bug to consider integrating the Guidelines Support Library (GSL) into the tree: https://bugzilla.mozilla.org/show_bug.cgi?id=1208262 This bug appea

Re: C++ Core Guidelines

2016-01-11 Thread Brian Smith
Henri Sivonen wrote: > On Wed, Jan 6, 2016 at 9:27 PM, Brian Smith wrote: > > Henri Sivonen wrote: > >> > >> On Thu, Oct 1, 2015 at 9:58 PM, Jonathan Watt wrote: > >> > For those who are interested in this, there's a bug to consider > >> > integrating > >> > the Guidelines Support Library (GSL

Re: C++ Core Guidelines

2016-01-09 Thread Henri Sivonen
On Wed, Jan 6, 2016 at 9:27 PM, Brian Smith wrote: > Henri Sivonen wrote: >> >> On Thu, Oct 1, 2015 at 9:58 PM, Jonathan Watt wrote: >> > For those who are interested in this, there's a bug to consider >> > integrating >> > the Guidelines Support Library (GSL) into the tree: >> > >> > https://bu

Re: C++ Core Guidelines

2016-01-06 Thread Brian Smith
Henri Sivonen wrote: > On Thu, Oct 1, 2015 at 9:58 PM, Jonathan Watt wrote: > > For those who are interested in this, there's a bug to consider > integrating > > the Guidelines Support Library (GSL) into the tree: > > > > https://bugzilla.mozilla.org/show_bug.cgi?id=1208262 > > This bug appears

Re: C++ Core Guidelines

2016-01-06 Thread Henri Sivonen
On Thu, Oct 1, 2015 at 9:58 PM, Jonathan Watt wrote: > For those who are interested in this, there's a bug to consider integrating > the Guidelines Support Library (GSL) into the tree: > > https://bugzilla.mozilla.org/show_bug.cgi?id=1208262 This bug appears to have stalled. What should my expec

Re: C++ Core Guidelines

2015-10-01 Thread Jonathan Watt
ay in the C++ standards community. It's a document called "C++ Core Guidelines" [1], intended to be a collection of widely applicable C++ best practices, that can serve as a template on which C++ projects can base their own, more specific guidelines. The document is a work in progre

C++ Core Guidelines

2015-09-30 Thread Botond Ballo
Hi folks, I wanted to draw your attention to a new project underway in the C++ standards community. It's a document called "C++ Core Guidelines" [1], intended to be a collection of widely applicable C++ best practices, that can serve as a template on which C++ projects can base