Author: Dann Corbit
Date: 13:25:25 12/24/02
Go up one level in this thread
On December 24, 2002 at 05:18:01, David Rasmussen wrote: >On December 24, 2002 at 04:22:12, Frank Sgarra wrote: > >> >> >>i belife nobody would write a chess program completly in assembler today >>may be only some very little pieces of code. >> >> >>it makes no sense to write the engine in C++ (fully OO) instead of C >>because the _MAIN_ problem in chess ist the algorithm and _not_ >>the question weatcher c or c++. > >It makes a lot of sense to write a chess engine in pure C++. At least as much >sense as it makes writing it in pure C. C++ doesn't mean object orientation. C++ >is a multiparadigm language. OO is one of the paradigms supported. C++ isn't >Java. It is bad C++ design to make everything a class. You can use C++ as a C >like language and still have many benefits like type safety, better I/O, >templates etc. > >A lot of engines are written with portability in mind, so pure assembly language >is not an option. Also, it typically makes for a bad design unless you're a very >skilled assembly language programmer. So higher level languages are the better >choice in that case. C++ is superior in anyway to C in that regard IMO. Junior (former SSDF #1) was written in C++. From Amir Ban's comments, it is also clear that he chose an object model. Rebel was written in 100% assembly language. I think that the choice of assembly for Rebel was good in some sense and bad in another. A true master can get a bit of extra zip from assembly. However, porting to make rapid changes is many times harder. Also, the code base is much, much larger. This makes changes more difficult. If Rebel had been written in C or C++, the port to native Win32 would have only taken a few weeks.
This page took 0 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.