Back to the future - python to C++ advice wanted

George Sakkis gsakkis at rutgers.edu
Fri Jun 17 09:26:50 EDT 2005


During the last 18 months or so I have indulged in the joy of learning
and using python for almost everything, but I may have to go back to
C/C++ at work. Suddenly I found myself transliterating (or translating
at least) common python idioms and patterns, looking for libraries to
replace python's "included batteries" or writing my own from scratch,
(over)using templates in an attempt to mimic duck typing, and so on.
Still, I am not sure if this is a good idea in general since every
language has its own idiosyncrasies, and this is obvious when one sees
python code looking like C or Java. OTOH, bringing python's higher
level of expressiveness to C/C++ might actually be a good thing,
leading to cleaner, safer code.

So, I wonder what have others who have gone the same path done and
learned in similar situations. How one can avoid the frustration of
having to work with a low level language once he has seen the Light ?

George




More information about the Python-list mailing list