Translating Python to C (was Re: Modulo operator : differences between C and Python)
Erik de Castro Lopo
nospam at mega-nerd.com
Sun Mar 10 22:01:54 EST 2002
Courageous wrote:
>
> >> Just recently I prototyped a relatively complex algorithm in Python
> >> before converting it to C.
>
> I'm curious about your experiences. I did something myself recently,
> creating a fairly sophisticated prototype in Python and then implemented
> it in C++. Given that I had all the algorithms worked out and thoroughly
> debugged, it was astounding to me how difficult it was to get properly
> translated and then validated. It took literally 3 times as long or longer
> to get the C++ version implemented and provably functional, this in spite
> of the design time work being included in what it took to do the Python
> implementation.
My experience was that once I had it working and validated in Python
converting to C was pretty trival. The validation I had done in Python
allowed me to find the problem in the C version pretty quickly. 80% of
the whole process was getting the Python code working.
> Programming in C++ genuinely depresses me.
Thats why I try to avoid C++ :-).
> And I'm an old veteran. I've been using it since the days of C Front, if
> anyone around happens to know what that means. :-)
I never used C Front but did spend a number of years (1990-1995) where
C++ was my main language. Nowadays I only use C++ when I really, REALLY
*REALLY* need C++ features. The rest is split between C and Python.
Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo nospam at mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
"Only wimps use tape backup: *real* men just upload their
important stuff on FTP, and let the rest of the world
mirror it ;)" -- Linus Torvalds
More information about the Python-list
mailing list