should i learn it first ?
bokr at oz.net
Mon Mar 11 04:36:14 CET 2002
On 10 Mar 2002 18:30:49 -0800, aahz at panix.com (Aahz Maruch) wrote:
>In article <oBTi8.1475$523.127893 at ozemail.com.au>,
>Patrick <netlangau at yahoo.com.au> wrote:
>>"Aahz Maruch" <aahz at panix.com> wrote in message
>>news:a6g7ra$lm6$1 at panix2.panix.com...
>>> 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.
>Right, and if you've got a project like that, you'd better have someone
>like Alex Martelli handy, because otherwise your C++ program will bloat
>with every advanced C++ feature you use. I'd bet that 90% of so-called
>C++ programmers would do far better in this case with C/Python.
I think a lot of bloat comes because C++ facilitates building libraries of
complex objects, and people will do the equivalent of buying that big red
rolling multidrawer metric/English super mechanic's dream tool chest, when
all they needed was a socket wrench. The cost of #include is not proportionately
perceptible. Yet sometimes the choice is buy the set or make the wrench yourself.
It would be interesting to how many object methods in a large application could
harmlessly be replaced with YAGNI assertions, even with smart linkers. After all,
they can't be smart enough to know whether a path that has a reference will ever
be entered, if it's data dependent, whereas the programmer might know very well
and yet be helpless to prevent the linkage of a big useless chunk of library.
It all depends ;-)
More information about the Python-list