[Development] Some Qt3D feedback
André Somers
andre at familiesomers.nl
Tue Jun 16 08:14:14 CEST 2015
Marc Mutz schreef op 15-6-2015 om 22:26:
> On Monday 15 June 2015 21:01:54 André Pönitz wrote:
>> if so:
>>
>> Please explain how that avoids name clashes.
> You only need to add the prefix when the compiler tells you. E.g. if you use
> QtGui::QTransform in one file and Qt3D::QTransform in another, in the same
> project, you can write QTransform in both, without ambiguity. Only when you
> need both in the same TU _and_ you using-direct _both_, you need to prefix
> QtGui:: or Qt3D::, but only for QTransform, not, say, QAspectThread.
Would that help with being able to read and understand the code, or
would it hinder? If someone were to post a snippet of code using that
QTransform in it, how does one know if that is QtGui::QTransform or
Qt3D::QTransform? Or would that be sufficiently clear from the context.
Code is, after all, not only to be understood by compilers, but also by
humans reading it. How would it affect people trying to use a search
engine to find out what QTransform does? At QtCS, we saw that quite a
portion of people just google class names for the docs (and discussed
that one still ends up at 4.8 docs a bit too often when doing that).
André
More information about the Development
mailing list