Python Productivity over C++

Wim Lavrijsen wlav at hpatl26.cern.ch
Wed Jun 14 04:30:53 EDT 2000


"Rainer Deyke" <root at rainerdeyke.com> writes:

>Wim Lavrijsen <wlav at atlas03.cern.ch> wrote in message
>news:8hr8fj$fu$1 at sunnews.cern.ch...
>> All that STL containers require is that your dtor and copy assignment
>> don't throw. The compiler generated members fullfill that requirement.

>This statement is both incorrect and misleading.

Bold words.

>Incorrect because there
>may be other requirements: for example, std::set (along with several others)
>requires that operator< and operator== are defined for the object.

Nonsense. You can specialize std::set with your own version of comparison
class instead of the standard less and you can make sure that your version
of it does not require said operators.

>Misleading because for many classes the compiler generated functions cause
>incorrect behavior.

As I have explained in another post, 'many' is only true for buggy code
that is not exception safe.

Of course, your statements only underline the original point, that is, that
the STL is to difficult to use for C++ novices. However, although it has
its flaws, the STL is well designed and all the simple things have been
taken care of real good.

Best regards,
         Wim Lavrijsen




More information about the Python-list mailing list