real world examples & python

Alex Martelli aleaxit at yahoo.com
Thu May 31 09:44:51 EDT 2001


"Steve Keri" <thefireinside at hotmail.com> wrote in message
news:ea903c3a.0105310123.61143fe2 at posting.google.com...
> Can someone give me examples of apps you can develop with scripting
> languages and maybe give examples of programs that are not a good idea
> w/ python and it should be left up to C++ and VB. Thanks a lot!

VB is a scripting language too -- can't think of anything
that "should be left up to" it rather than done in Python.

If you like VB's _tools_ for, e.g., painting GUI's, you
can paint the GUI in VB and call on Python for the actual
application logic -- Hammond & Robinson exemplify that,
among other ideas, in Python Programming on Win32, their
excellent book -- but someone else will detest VB GUI's,
where you have to manually place controls rather than
having a layout manager handle it for you, and prefer,
e.g., wxDesigner or whatever.

Oh, sure, you CAN compile VB down to machine code -- but
it won't matter all that much performance-wise.

C++ is a completely different issue because performance
was always close to the top among the language's design
objectives, as was potential for operating very close
to the machine.  If you must write an operating system,
lots of its guts may be in C++, with little assembly
language.  Python (or VB!) would be quite inappropriate
for working VERY close to the hardware.  And if you need
to get close to 100% of your platform's performance for
some specific task, C++ is a good candidate (if you really
know how to use it well, and have a world-class compiler
for it, of course).  Extensions to Python are written in
C++ (or C) because of that -- either a need to get very
close to the platform (hardware, OS, &c), or a need for
speed (in some specific bottleneck).

Apart from OS pieces, the only purpose where Python can't
displace C++ (or C, etc) is writing Python extensions:-).


Alex






More information about the Python-list mailing list