Yeah, I like to ask myself whether I am losing any information by using
auto. If it ends up eliminating redundancy within a line of code, I like
to use it. OTOH if it eliminates useful human-friendly type information
from the code then I don't.
On 6/2/2015 2:43 PM, Martin Thomson wrote:
On Tue, Jun 2, 2015 at 1:35 PM, Kyle Huey <m...@kylehuey.com> wrote:
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
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform