[Development] RFC: more liberal 'auto' rules?
Marc Mutz
marc.mutz at kdab.com
Fri Dec 4 19:39:57 CET 2015
On Friday 04 December 2015 14:12:00 Rafael Roquetto wrote:
> Until you need to change your code and call any method of bar.
QtC prints the signature of the function when you hover the mouse over it —
since _ages_. It also completes function names of auto variables. Since
_ages_. Even if it should be the case that it doesn't, yet, show the deduced
type when you hover over the 'auto', the lhs can be inspected by hovering, and
the rhs's type is clear[1].
But ok, for those of us using vi, I motion to ban function chaining like
le->setText(foo.description());
or
foo->bar()->setFaz(m_factory->createFaz(foo->bar()->type()));
Everyone in favour of restricting auto use due to readability concerns is
automatically (no pun intended) counted as in-favour of the motion, with
prejudice.
Thanks,
Marc
[1] If it's not clear, we need to ban the use of template functions.
--
Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
Tel: +49-30-521325470
KDAB - The Qt Experts
More information about the Development
mailing list