should i learn it first ?

Peter Hansen peter at engcorp.com
Sun Mar 10 20:44:24 EST 2002


Patrick wrote:
> 
> "Aahz Maruch" <aahz at panix.com> wrote:
> >
> > But are there any tasks for which C++ (or C++/Python) is really better
> > than C/Python?
> 
> One example is an extremely complex and long-running simulation in which the
> time-critical components are a very substantial chunk of the project. In
> those (rare) situations you need ruthless efficiency with slightly better
> than rudimentary abstraction capabilities. C++ fits the bill, but only if
> every processor cycle and every byte counts.

Nice example, though even then there are two items to consider:

If every cycle matters that much, can't one buy faster hardware?  Hardware
is usually cheaper than development time these days and if we're talking
a long-running simulation it might be cheaper than run time.

Also, if the program is that complex, might it not be the case that
development on it would finish months earlier if written in Python with
bottlenecks rewritten in C, and all that extra time would be available to
run this _perhaps_ slower program and maybe end up no slower overall?

> The vast majority of programmers will never go anywhere near a project like
> that. Even "real programmers" very seldom do. 

Very true.  I thought I had a few times, but then I realized I hadn't.
The only problem is that it wasn't until I learned Python that I realized
it, and years had already gone by so the time was lost forever. :(

-Peter



More information about the Python-list mailing list