[Qgis-developer] Better getNextFeature in vector providers

Mateusz Łoskot mateusz at loskot.net
Mon Mar 20 05:41:47 EST 2006


Martin Dobias wrote:
> On 3/20/06, Mateusz Łoskot <mateusz at loskot.net> wrote:
> 
>>>However after some thinking and looking in QVariant sources, I don't
>>>think that we really need something like boost::any and that QVariant
>>>will suffice - I didn't find any inefficiencies in the
>>>implementation. The second reason is that we should prefer Qt classes
>>>to make the code as consistent as possible.
>>
>>
>>OK, in this case it's more a matter of taste.
>>Simply, I'd choose Boost as I'm STL/C++ purist.
>>
>>But I don't agree that Boost would make code inconsistent.
>>If you think so, why don't you replace all STL's containers
>>with QVector and QList?
> 
> 
> OK, I agree that it wasn't a good argument :-)
> I just meant that we don't need to use it since we have the same
> functionality already in Qt.


Yup, you're right.


>>STL is a part of C++ library, Boost is a kind of incubator for future
>>STL features. Boost is high quality professional library and I can't
>>understand why people are affraid of it so much.
>>Because of "dependency"?
>>IMHO There is no sense to abandon highly usable library because it could
>>introduce new dependency :-)
> 
> 
> Surely it's a very handy library and it would be great to have those
> features directly in C++. Being a standalone library is probably the
> factor that people don't use it much as they don't want it as an
> additional dependency... It's really all about matter of taste :-)

IMHO Boost becomes widely used as people are getting more familiar with 
metaprogramming. In most cases people write in "C++ with classes" 
instead of "modern C++" and metaprogramming scares them much.
That's what I see as the main reason.

Cheers
-- 
Mateusz Łoskot
http://mateusz.loskot.net



More information about the Qgis-developer mailing list