On Wed, 2018-01-17, Real Troll wrote:
> I wonder whether there is any need to define data types
You mean "spell out the type" or something.
> these days when
> we can easily declare automatic types using auto? For example this
> program compiles just fine in modern compilers:
...
> auto a = 1;
> auto b = 1.0;
> auto c = a + b;
> auto d = {b, c};
...
Don't forget 'const auto' and 'const auto&'.
I don't think there's any concensus about when and how often to use
'auto'. Some say "as much as possible!" which I disagree with.
/Jorgen
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/
snipabacken.se> O o .