On Tue, Jun 2, 2015 at 1:35 PM, Kyle Huey <m...@kylehuey.com> wrote: >> 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.
I have no sympathy for this. If you had a decent IDE, the IDE could do that lookup for you, but don't force the reader/reviewer of your code to do that. Code is read many more times than it is written. > It also makes a lot of sense in situations where the type name is noise. > e.g. > > auto foo = reinterpret_cast<ReallyLongTypeName*>(bar) > auto it = map.find(stuff) This, on the other hand is a good reason. The first has the type name right there. The second has a type name that is clear from the type of the collection (and a really noisy name at that). _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform