On Thu, Feb 16, 2017 at 9:09 PM, Botond Ballo <bba...@mozilla.com> wrote:
> In the case of begin() and end(), it's not just a matter of style.

It seems that nsTArray, too, mixes these into a class that otherwise
follows Mozilla naming, so I guess we have enough precedent for using
the standard-library naming for iterator interop and Mozilla naming
for other stuff in the same class.

On Thu, Feb 16, 2017 at 7:24 PM, Henri Sivonen <hsivo...@hsivonen.fi> wrote:
> It seems that even size() and empty() should be lower-case if one
> wants a type to quack like a Container:
> http://en.cppreference.com/w/cpp/concept/Container
>
> Should these, too, no longer be capitalized?

I fail to find precedent for lower-case size() and empty() in a class
with otherwise Mozilla-case methods. However, we do have code that
uses standard-library containers in m-c (mainly code originating from
Google), so it seems like a bad idea to break compatibility with
standard-library collections. I think I'm going to proceed with
keeping size() and empty() in lower case in order to quack like a
standard library container but provide synonyms Length() and IsEmpty()
for use from Mozilla-style code.

-- 
Henri Sivonen
hsivo...@hsivonen.fi
https://hsivonen.fi/
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to