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

Oswald Buddenhagen oswald.buddenhagen at gmx.de
Sun Oct 20 09:49:04 CEST 2019

On Sun, Oct 20, 2019 at 12:14:29AM +0300, Ville Voutilainen wrote:
>On Fri, 18 Oct 2019 at 19:53, Edward Welbourne <edward.welbourne at qt.io> wrote:
>> Putting the * or & to the left of the space promotes the lazy reading of
>> a declaration as being
>>   type name;
>> which works just fine for the most common cases, but lulls readers into
>> using a mental model that will leave them entirely unprepared for the
>> subtleties that arise when anything trickier happens.
>This logical argument doesn't work. There's evidently no such lull,
do you have evidence for that claim? eddy at least provided anecdotes.

>nor does putting the type-meta-modifiers next to the variable name 
>result in a deeper understanding of how declarators work
not as such, but each time someone asks about/doubts the current style, 
they get educated.

More information about the Development mailing list