Scripting language for an application

Cameron Laird claird at starbase.neosoft.com
Thu Sep 28 14:09:34 EDT 2000


In article <wk8zsc7ehy.fsf at turangalila.harmonixmusic.com>,
Dan Schmidt  <dfan at harmonixmusic.com> wrote:
>Marco Seiriö <marco at crepido.com> writes:
>
>| I'm doing research (=surfing the web) in order to see
>| what language I will use in an application (C++) we are
>| building. Today we use Perl to some extent. Would you
>| think there would be any benefit from using Python instead/also?
>| 
>| My main concerns are speed and ease of use.
>
>We are using Python here as an embedded language and it's working
>wonderfully so far.  I don't know how it would compare to Perl for
>speed, but it's very easy to use.
>
>If you use Python, you undoubtedly want to either use
>
> - Swig <http://www.swig.org> if you want to generate an interface
>   automatically between Python and your C++ classes, or
>
> - CXX <http://cxx.sourceforge.net> if you want to do your interfaces
>   by hand.
>
>We're using CXX and it's very clean.  I recommend it highly for any
>project combining Python and C++ (especially after looking at how the
>interfacing is done in straight C!).
			.
			.
			.
It's possible to embed Perl.  It's so unpleasant, though, as
to be one of the principal impulses behind Perl6.

In contrast, Python is *designed* to be embedded.  It's happy
being embedded, and rather fun to do, at least in comparison
with Perl.

I second the recommandations of CXX and Swig.

There are operations for which Perl is faster than Python--oc-
casionally even quite a bit faster.  It would surprise me quite
a bit if any of them will arise in the application you're con-
templating.  I expect Python's processing speed will be more
than adequate for your application.

Python was designed as a language newcomers would learn quickly
and easily.  Perl makes Unix sysads comfortable.  

That's about as much as can be said in response to the little
information you've presented.
-- 

Cameron Laird <claird at NeoSoft.com>
Business:  http://www.Phaseit.net
Personal:  http://starbase.neosoft.com/~claird/home.html



More information about the Python-list mailing list