[Qt-interest] Configure QtDesigner ui.h
Danny Price
deepblue842 at googlemail.com
Sat Sep 3 03:14:09 CEST 2011
On 2 Sep 2011, at 23:59, Scott Aron Bloom wrote:
> The coding style of boost, and Ill be even more bluntly then before..
> Sucks. Sorry, not everything is a fricking template. When using
> boost, I have seen object files quadruple in size even with PCH turned
> on...
The people who develop Boost are the same people who develop the C++ library and classes. Get used to it.
> Not to mention, its ~1GB store on every machine that needs to be able to
> build off network.. Ie, all offsite developers.. Taking 1.5 Hours + to
> download via SVN...
Wait...why are you downloading it from SVN? Unless you're committing changes that's pointless. Just get the tarball (~55mb).
I downloaded the latest version to install on macbook air last week - it took 1 min to download on a less than great ADSL connection. Also the air has no network port so this was over wifi.
> Most of my production level projects, move slowly when it comes to
> compilers.. I had one client, who is still on Dev 6, and Gcc 3.2.. Why?
And I'm sure there was a time when they were perfectly content with Turbo C and DOS 6.0.
> It works, the product is stable and making money. And only critical
> bugs are considered for fix. If the fix was a memory leak, I couldn't
> even consider boost..
You don't need to build boost! Most of the classes are templates which require only a header file (this includes all the smart pointers). Only templated functions that are actually USED will be compiled and linked.
Also if you need to build the libraries, you only need to build them ONCE (and optimize things further through the use of precompiled headers). If you're checking 3rd party libraries into your own source control system and/or are adding them to your own build system then you're doing it wrong.
> Now, most have moved to Dev 2008, not 2001. So auto_ptr is the solution
> for them. Boost could be used, with the necessary hacks for 2008. Many
> are still on about a 2 year old gcc.
Older versions of boost are available for years back and many of the core classes haven't changed. Mac OSX still uses the old gcc 4.2 for licensing reasons. This predates tr1. The latest boost package builds without complaint. Make no mistake, this is an old toolchain.
>
> Again, moving a 30-40 person dev team to a new compiler, just to make
> the boost people happy, is not going to happen.
What new compiler? Boost uses templates. Any cpp compiler from the last 5 years will be capable of using boost.
>
> For this issue, ie, having a single instantiation of the ui.h file, that
> does not require explicit deletion, auto_pointer works, has low
> overhead, no risk
> Scott
Don't write off an entire code library because you don't know how to use it. Just because a legacy code base is working fine doesn't mean that any new required additions cannot be implemented using modern best practice.
I once worked on an CAD application that was a horrible mismash of C and C++, some of it dating back to the 80s. It had to be compiled with the lowest warning level otherwise MSVC would choke on all the warnings alone. That was a profitable commercial product where features had been bolted on but the company realized that the code base was longer maintainable, particularly when significant parts had to be re-written just to run under Windows Vista.
But through some common sense idioms, like pimpl, smart pointers and some templating, we were able to massively reduce compilation time, the volume of warnings and the sanity of the code for future additions. To the customer the product was the same, but we able to fix issues and turn out new releases at hugely reduced cost.
>
> -----Original Message-----
> From: qt-interest-bounces+scott.bloom=onshorecs.com at qt.nokia.com
> [mailto:qt-interest-bounces+scott.bloom=onshorecs.com at qt.nokia.com] On
> Behalf Of Danny Price
> Sent: Friday, September 02, 2011 2:34 PM
> To: Thiago Macieira
> Cc: qt-interest at qt.nokia.com
> Subject: Re: [Qt-interest] Configure QtDesigner ui.h
>
> Where exactly did I claim that 'using boost will solve ALL your memory
> problems'? You're the one making generic statements.
>
> I said that not using boost because you're worried about introducing a
> dependency is a poor justification for risking easy-to-make mistakes
> with bald pointers. Believe me I've seen it. This is not 1998. We have
> better tools now. You're using Qt. You have QSharedPointer at least. Use
> it.
>
> On 2 Sep 2011, at 22:03, Thiago Macieira wrote:
>
>> He's right. You're again making a very generic claim that using boost
>> will solve all of your memory problems. That's not correct.
>
>
> On 2 Sep 2011, at 22:03, Thiago Macieira wrote:
>>
>> He's right. You're again making a very generic claim that using boost
>> will solve all of your memory problems. That's not correct.
>
> Again WHERE did I make such a claim?
>
>>
>> It might help, but you may still do things wrong:
>>
>> int i;
>> boost::scoped_ptr<int> ptr(&i);
>
> Oh very clever. How about less obvious problems like double deletes or
> references (&) to deleted objects passed to other functions, errors that
> some big compilers will not catch. Or implementing command-pattern
> classes where you cannot control the ownership of object lifetimes or
> have to treat every assignment with suspicion?
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110903/8eb92f65/attachment.html
More information about the Qt-interest-old
mailing list