Python -> C++ compilation

Courageous jkraska1 at san.rr.com
Thu May 31 03:23:11 EDT 2001


>> Corporations have additional concerns, like "who's going
>> to maintain your code after you are gone?" Perhaps, for
>> example, they don't want to train up a Python staff. If so,
>> that's their loss, but also their prerogative.
>
>I will not leave Python code around, only C++ one. 

Which will be fine until *another* developer on your staff
checks in a change into CVS on top of your C++ code. Furthermore,
as I pointed out before somewhat obliquely, generated code is
often nightmarish (and uncommented). There's no way something
like this could ever survive on a team effort, and what you'd
be leaving behind wouldn't be fit for human consumption.

Hence my categorical rejection of this idea (speaking as an
engineering lead).

Having you worked on very many group efforts? Issues of coding
"on the same sheet of music" as well as coordinating with
other developers raise their ugly head. Surely you're aware,
for example, that many projects have specific coding standards,
comment content rules, and so forth, right?

Your generator simply _cannot_ fit in here. Even if your
Python->C++ generator magically passed all your comments
through, they'd likely be garbled once they reached C++.

If you're working on a solo project where the leave-behind
code is not intended to be inspected by other developers, you
should just be using your language of choice as is. It would,
in my opinion, be easier for a C++ programmer to learn Python
and then decode your work than it would be for them to fiddle
through generated code, even when said code was already in C++.

and-it-would-be-better-for-everyone's-sanity ly yrs

C//





More information about the Python-list mailing list