Can we agree on using the using directive instead of typedefs when it comes to 
namespaces? I think it's less likely to lead to confusing compile errors than 
typedefs.

class nsSVGUtils
{
  using mozilla::gfx::FillRule;
  using mozilla::dom::Element;
  public:
    static FillRule GetFillRule(Element* aElement);
};

Thanks,
Monica

----- Original Message -----
> On Fri, Nov 1, 2013 at 6:27 AM, Jonathan Watt <jw...@jwatt.org> wrote:
> 
> > The style guide doesn't seem to address this:
> >
> > When I have, say, a class in the global namespace called nsSVGUtils, what
> > is preferred:
> >
> > class nsSVGUtils
> > {
> > public:
> >
> >   // blah blah
> >
> >   static mozilla::gfx::FillRule GetFillRule(mozilla::dom::**Element*
> > aElement);
> >
> >   // blah blah
> >
> > };
> >
> > or:
> >
> > class nsSVGUtils
> > {
> >   typedef mozilla::gfx::FillRule FillRule;
> >   typedef mozilla::dom::Element Element;
> >
> > public:
> >
> >   // blah blah
> >
> >   static FillRule GetFillRule(Element* aElement);
> >
> >   // blah blah
> >
> > };
> >
> > Or is either fine?
> >
> 
> I strongly prefer the latter. It makes the code a lot more readable.
> 
> Rob
> --
> Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
> le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
> stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
> 'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
> waanndt  wyeonut  thoo mken.o w  *
> *
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
> 
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to