Embedded Perl or Python (XPost)

C

Chris

Hi

I am posting this on both the perl and python groups

My intention is not to start a war or anything else, I would just like
some pragmatic advice.

My apologies to the python group I am not very conversant with Python at
this stage. that could change soon though.

OUTLINE

I am developing a software project where a major portion of it is to
enable script access to c++ classes

The idea is to extend the basic functionality of the program by allowing
third parties to write add ons that are called by my c++ classes as
virtual functions.

So if I call vfunction(); and an add on has been written that redefines
this function (and possibly calls the base c++ function) that it is
called correctly.

I have chosen perl and python as my preferred languages because of the
large developer base for add ons

The interpreter will only have a subset of the standard funtionality, for
example sockets will be removed.

QUESTION

Given the above which interpreter is most likely to fit my bill with the
smallest footprint ?

Thanks in advance
Chris
 
A

Alex Martelli

Chris wrote:
...
So if I call vfunction(); and an add on has been written that redefines
this function (and possibly calls the base c++ function) that it is
called correctly.

I have chosen perl and python as my preferred languages because of the
large developer base for add ons

The interpreter will only have a subset of the standard funtionality, for
example sockets will be removed.

QUESTION

Given the above which interpreter is most likely to fit my bill with the
smallest footprint ?

No idea about "footprint", partly because it so crucially depends on
what you will or won't remove. But trying it out for benchmark and
measurement is trivially easy for Python -- use Boost Python, which
you get from www.boost.org, and the "subclassing C++ in Python with the
possibility of overriding virtual functions" functionality is there.

Assuming it's just as easy for Perl (sorry, no idea), trying it for both
languages and measuring footprint should fit comfortably within an afternoon
with ample time left over for tea;-).


Alex
 
C

Chris

LOL

thanks for the heads up on Boost

I have just downloaded Swig and am beginning to explore that, So boost
also sounds like a good idea.

I think with my penchant for small things I may be getting carried away.

I guess suck it and see is my best option, I have explored the source
code for perl 5.8 and got considerably lost :(

I will have to try python and see if I come out any wiser

Regards
Chris
 
C

Chris

Hi

I am posting this on both the perl and python groups
SNIP


QUESTION

Given the above which interpreter is most likely to fit my bill with
the smallest footprint ?

Thanks in advance
Chris

Ok Guys thanks for the input

I have decided to try and take the best of both worlds (why not)

Size restrictions permitting I will include both a PERL interpreter and a
Python Interpreter

at least as a users choice

That way I get all you wonderful developers creating fab scripts to
extend my software

:)

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,150
Latest member
MakersCBDReviews
Top