Converting Python app to C++ completely

Alan James Salmoni salmonia.nospam.please at cardiff.ac.uk
Fri Aug 30 14:09:48 CEST 2002


Sean 'Shaleh' Perry wrote:
> On Thursday 29 August 2002 10:37, Alan James Salmoni wrote:
<SNIP>
> Most of your extra lines come from having to statically type everything.

That's okay - I have done some stuff in Ada and Pascal, so I should be 
okay with static typing.

> Josuttis' "The C++ Standard Library" is a must read.  The STL gives you a lot 
> of what Python has built in.
>
> for_each(container.begin(), container.end(), function);
> 
> is the equivalent of map() except it does not return a new list.  Implementing 
> filter takes a bit more work but can be done.

Excellent - I shall look it up!

> In general C++ will be more verbose than Python.  Using references and the STL 
> it is possible to code fairly complex applications without using pointers but 
> most likely you will have to learn about them and use a couple.

I think that's what worries me - luckily, my code is fairly basic so I 
might be able to avoid them as much as possible, but I should learn 
about them really.

Thanks!

Alan.




More information about the Python-list mailing list