Computer Chess Club Archives




Subject: Re: C and C++ --- NPS

Author: David Rasmussen

Date: 04:07:19 12/26/02

Go up one level in this thread

On December 25, 2002 at 15:27:03, Dave Gomboc wrote:

>On December 25, 2002 at 15:00:21, Matt Taylor wrote:
>>>OK. Inability to use a tool shouldn't be blamed on the tool.
>>Unless the tool is kludgy, in which case the tool can be blamed for being
>>difficult to use.
>Um... there are much harder things in software development than declaring a
>function extern "C".

I was about to say almost the same:
If writing extern "C" is your most complex problem, you're lucky. I don't find
it kludgy at all. You don't have to use it, you only use it if you want that
specific feature (C linkage). How would you suggest a language goes about being
type safe and also having optional C linkage?

All of this is really peanuts.
I can't believe there's a whole subthread about mispredictions of unconditional
jumps (which I don't believe affects prediction anyway). Dann said it very
"The performance cost for changing to C++ will be 5% at most, if it is done

The increase in abstraction will be worth this cost many times over.  Trying out
new ideas will be ten times easier."

You wont lose any relevant performance (if any at all. Actually you might gain
performance, depending on your competence), and you will gain a lot from design
and abstraction. Look at the development log of Crafty, or think about the bugs
in your own engine (if you have one). Many of these bugs are of the kind that
could never happen with the right design.

It's not to say that everybody writing a C engine is a fool or that C++ is the
only language to use. It's just that this thread shows a lot of misconceptions
about C++ that need to be corrected. There are no inherent problems in using C++
for this, in fact there are many advantages. If people choose C, fine. Just
don't spread false information about C++ to justify it.


This page took 0.07 seconds to execute

Last modified: Thu, 07 Jul 11 08:48:38 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.