Subject: Re: [boost] usage of auto in tutorials
From: Robert Ramey (ramey_at_[hidden])
Date: 2019-03-19 20:10:20
On 3/19/19 8:49 AM, Andrzej Krzemienski via Boost wrote:
> I wonder what others in this group think? Maybe we could come up with some
> guidelines for documentation writers.
FWIW - my personal rule is to never use auto.
The type conveys information. I think hiding information is a bad idea
in general. (note before anyone complains: hiding information is not
the same as abstracting and interface).
auto is hack to permit one to work around some unfortunate situation
which might occur while engaged in Template MetaProgramming. I haven't
kept track, but I've found it necessary in probably less than 10 cases
over the years.
(Almost) Never use auto!)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk