[Development] The age-old T* foo vs. T *foo

Kyle Edwards kyle.edwards at kitware.com
Thu Oct 17 22:12:09 CEST 2019


On Thu, 2019-10-17 at 20:01 +0000, Martin Smith wrote:
> But that argues for not allowing the comma.
> 
> QObject* x;
> QObject* y;
> 
> I've always done it that way.

+1 for not allowing the comma. It's not as much of an issue for simple
types (int x, y), but combining it with pointers and references
introduces ambiguity and makes the code less readable - and readability
is, IMHO, far more important than saving a few keystrokes.

Kyle


More information about the Development mailing list