First release of Shed Skin, a Python-to-C++ compiler.

M

Mark Dufour

In general it's considered quite pythonic to catch exceptions :)
It's a particularly useful way of implementing duck typing for example.
I'm not sure if I've got *any* code that doesn't use exceptions
somewhere....

Hehe. Okay. It will probably always be the case that you have to lose
some Python features if you want the code to run really fast. I
suppose PyPy's restricted Python subset doesn't support duck typing
either. Luckily not all code is performance critical, or you could
just try and optimize some performance critical part. But anyway, I'm
starting to understand that Shed Skin should probably support
exceptions wherever possible :)

The main goal of Shed Skin is to be able to specify C++-like code at a
higher level, not to be able to optimize arbitrary Python programs..
:) For the kinds of things I write (algorithmic-like code), I really
don't need the full flexibility of Python. It's just great to be able
to leave out type declarations, and to use the beautiful Python
syntax.
 
F

Fuzzyman

Mark said:
Hehe. Okay. It will probably always be the case that you have to lose
some Python features if you want the code to run really fast. I
suppose PyPy's restricted Python subset doesn't support duck typing
either. Luckily not all code is performance critical, or you could
just try and optimize some performance critical part. But anyway, I'm
starting to understand that Shed Skin should probably support
exceptions wherever possible :)


Ok - the point I was trying to make was that exceptions were pretty
integral to Python. I accept that losing the more dynamic features of
Python for 'compilation' is a possibly worthwhile tradeoff.

How easy is it going to be to call your c++ code from Python (and vice
versa) ?


Fuzzyman
http://www.voidspace.org.uk/python/index.shtml
 

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,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top