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

M

Mark Dufour

Obviously, neither the 0 nor the message following should have been
displayed. It's a pity that this assumption was made, but given the short
time the project's been going I can understand it, hopefully Mark will
continue towards greater python compliance :)

The latter is certainly my goal. I just haven't looked into supporting
exceptions yet, because I personally never use them. I feel they
should only occur in very bad situations, or they become goto-like
constructs that intuitively feel very ugly. In the 5500 lines of the
compiler itself, I have not needed to use a single exception. For
example, I prefer to check whether a file exists myself, rather than
executing code that can suddenly jump somewhere else. There's probably
some use for exceptions, but I don't (want to?) see it.

Seeing how often exceptions are used by other people though, it's
probably one of the first things I should look into.. :)


thanks!
mark.
 
F

Fuzzyman

Mark said:
The latter is certainly my goal. I just haven't looked into supporting
exceptions yet, because I personally never use them. I feel they
should only occur in very bad situations, or they become goto-like
constructs that intuitively feel very ugly. In the 5500 lines of the
compiler itself, I have not needed to use a single exception. For
example, I prefer to check whether a file exists myself, rather than
executing code that can suddenly jump somewhere else. There's probably
some use for exceptions, but I don't (want to?) see it.

Seeing how often exceptions are used by other people though, it's
probably one of the first things I should look into.. :)

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....

;-)

All the best,

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top