Back to the future - python to C++ advice wanted
D H
d at e.f
Fri Jun 17 16:31:32 EDT 2005
George Sakkis wrote:
> 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 ?
That's why so many people have switched to Java or C# (or Python and
other langugages of course). You might talk to them about using Python,
since Python and C/C++ fit together very nicely (with tools like BOOST,
SWIG, Pyrex,...). But me personally I like to avoid C++ altogether when
possible, and use Java or C# instead, both of which also can be combined
with python or python-like languages such as jython, groovy, or boo.
More information about the Python-list
mailing list