Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: c,c++5,c#.

Author: Tord Romstad

Date: 03:01:32 08/12/04

Go up one level in this thread


On August 11, 2004 at 15:33:16, Sune Fischer wrote:

>For chess, since you ask, it must be fast so either C or C++.

I don't quite agree.  Speed is vastly overrated in computer chess.
Except for a few games between the top professional engines, speed
is rarely the decisive factor.  Bugs and efficiency on a higher
level (i.e. good algorithms) are far more important.

It is better to just choose some language with which you feel comfortable,
and with which you are able to write clear and reasonably bug-free code.
It should be a language with an optimizing compiler which compiles to
native machine code, but there are plenty of languages to choose from.
Ada, C, Delphi, Lisp and ML are some of the possibilities.  Any of these
languages should be fast enough to bring you up to the level of the top
amateur engines.

>Personally I see no reason to use C, C++ offers a lot more and there's
>no speed penalty.

There is a portability penalty, though.  And although C++ may offer a lot
more, I don't see why you need a lot more.

>C is a smaller language and easier to learn, but you might pick up some bad
>habits that will take you a while to get rid of if you move on to OOP. I'm
>talking from experience here.

C and C++ are both bad as first languages, IMHO.

>It is estimated that C# is about 3 times faster than C++ (MFC) to develop in, so
>for applications that aren't speed critical C# would probably be the obvious
>choice.

3 times faster is not much.  I have never programmed in C# myself, but if
the 3 times faster than C++ estimate is correct, I really hope C# is not the
future.

Tord




This page took 0.01 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

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