On Tuesday 2015-06-02 22:58 +0300, smaug wrote:
> So, I'd like to understand why people think 'auto' is a good thing to use.
> (bz mentioned it having some use inside bindings' codegenerator, and sure, I 
> can see that being rather
> valid case.)

One context where I think it often makes sense is for integral
types, e.g., for things like:

  auto len = aArray.Length();
  auto display = GetStyleDisplay()->mDisplay;

It can save having to look up whether aArray.Length() returns size_t
(I sure hope it does, though) or whether mDisplay is uint8_t or
uint16_t.


That said, I do agree that using auto often obscures information.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                          https://www.mozilla.org/   𝄂
             Before I built a wall I'd ask to know
             What I was walling in or walling out,
             And to whom I was like to give offense.
               - Robert Frost, Mending Wall (1914)

Attachment: signature.asc
Description: Digital signature

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to