On Jan 29, 2010, at 2:14 PM, ext Danny Price wrote:

> Creator seems to have issues with nested classes. It actually used to crash 
> in this case but that bug was fixed (once I finally convinced Nokia it was a 
> problem...).

I don't think you convinced "the company Nokia" - most of the company will not 
even read your bugreport or this mailing list. You might have convinced some Qt 
Creator devs though.

>> Some people actually like to use trivial nested classes to aid in code 
>> completion. It can be convenient to type in something like "aaa." and then 
>> quickly choose what you want. Think of it as a namespace within a class.
> 
> You should write code based on best coding and design practice, not to adhere 
> to the whims of a particular IDE's syntax completion.

What does that have to do with any particular IDE?

> Class nesting is like function nesting in old C - it get's out of control 
> fast. Pmpl is an exception (and in that case the class is defined within the 
> cpp file anyway). For most other cases, class friendships are better.


Friend declarations get out of control even faster.
As with almost all programing concepts it's all about having guidelines for the 
concept's uses, so they don't get out of control.
That applies to the examples above too, both friend declarations and nested 
classes.
BTW, nested classes (and structs and enums in classes) are used at several 
places throughout Qt and Qt Creator, exactly for namespacing + encapsulation.

-- 
Eike Ziller
Software Engineer
Nokia, Qt Development Frameworks

Nokia gate5 GmbH
Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany
Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443 B
Umsatzsteueridentifikationsnummer: DE 812 845 193
Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori




_______________________________________________
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator

Reply via email to