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

Alexander Nassian nassian at bitshift-dynamics.com
Thu Oct 17 22:43:23 CEST 2019

The * or & or && always have an impact on the actual type the variable has. So my logical implication would be that *, &, && has to be placed there: QObject* x and not QObject *x.

Beste Grüße / Best regards,
Alexander Nassian

> Am 17.10.2019 um 20:06 schrieb Ville Voutilainen <ville.voutilainen at gmail.com>:
> Since we are about to do a major version upgrade, should be stop being
> a special snowflake in the C++ world and start attaching pointer-stars
> and reference-ampersands to the type instead of to the variable?
> As a quick example of how our current style is just odd, consider
> for (auto &&x : oink)
> Sure, that's in accordance with our style. It looks very out of place when
> coming back to our code after adventures in other code. Quick reading
> of it tends to suggest that it's a by-value thing since quick eyes see
> auto without any decorations.
> I don't expect the transition, should we agree to have it, to be easy
> for people accustomed to the Qt style. I also don't have any sort of numbers
> about whether our style is used elsewhere. In contrast, people with lots
> of exposure to non-Qt style tend to have to fight ours, it just doesn't come
> naturally.
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> https://lists.qt-project.org/listinfo/development



bitshift dynamics GmbH
Neudorfer Str. 1, 79541 Lörrach

Registergericht: Amtsgericht Freiburg i. Breisgau, HRB 713747

Geschäftsführer: Alexander Nassian, Markus Pfaffinger

http://www.bitshift-dynamics.de <http://www.bitshift-dynamics.de/>

Zentrale: +49 762158673 - 0
Fax: +49 7621 58673 - 90

Allgemeine Anfragen: 
info at bitshift-dynamics.com <mailto:info at bitshift-dynamics.com>
Support: support at bitshift-dynamics.com 
<mailto:support at bitshift-dynamics.com>
invoice at bitshift-dynamics.com <mailto:invoice at bitshift-dynamics.com>

More information about the Development mailing list