Re: Using consistently auto as function return type

2012-06-16 Thread Era Scarecrow
On Saturday, 16 June 2012 at 09:31:35 UTC, Tommi wrote: Do you consider it to be good or bad style of programming to use consistently auto as function return type? One of the pros is that it saves some redundant typing when the function returns some complex templated type: auto getValue() {

Re: Using consistently auto as function return type

2012-06-16 Thread Timon Gehr
On 06/16/2012 11:31 AM, Tommi wrote: Do you consider it to be good or bad style of programming to use consistently auto as function return type? One of the pros is that it saves some redundant typing when the function returns some complex templated type: auto getValue() { return

Re: Using consistently auto as function return type

2012-06-16 Thread bearophile
Tommi: Do you consider it to be good or bad style of programming to use consistently auto as function return type? In Python programming you don't specify the types of function arguments and return values, but while this is possible in Haskell too, it's good practice to write down input and