Python Productivity over C++

Ken Seehof kens at sightreader.com
Tue Jun 13 18:55:10 EDT 2000



Christian Tanzer wrote:

> "Frank V. Castellucci" <frankc at colconsulting.com> wrote :
>
> > > > 2. There is the type information in standard conforming compilers.
> > >
> > > Nowadays, there is.
> >
> > Agreed, but the language had the ability for you to write your own, or
> > use someone else's library which provided the same.
>
> Sure it provides it. But you have to implement it. And that costs
> time.
>
> The decisive difference is:
>
> - in C++ you have to add RTTI code to every class in the class
>   hierarchy -- it is simply impossible to factor the behavior into the
>   root of the hierarchy.
>
> - In Python, you can implement the entire mechanism needed in the root
>   of the hierarchy.

> Of course, nobody forces you to do that, and you might end up with
> exactly the same design as in C++.

What are you referring to?  In python, you get more introspection capabilities
than RTTI without writing any mechanism at all!  Arbitrary python objects can,
for example, be serialized with absolutely no serialization coding at all even
at the root of the heirarchy (provided that the objects are "well behaved").

> <snip>
> --
> Christian Tanzer                                         tanzer at swing.co.at
> Glasauergasse 32                                       Tel: +43 1 876 62 36
> A-1130 Vienna, Austria                                 Fax: +43 1 877 66 92

--
Ken Seehof
kens at sightreader.com
starship.python.net/crew/seehof
Hi! I'm a .signature virus! copy me into your .signature file to help me
spread!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: kens.vcf
Type: text/x-vcard
Size: 343 bytes
Desc: Card for Ken Seehof
URL: <http://mail.python.org/pipermail/python-list/attachments/20000613/3e53dea6/attachment.vcf>


More information about the Python-list mailing list