Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: sharing thoughts about general search code

Author: Jay Scott

Date: 13:25:26 04/02/04

Go up one level in this thread


On April 01, 2004 at 21:33:00, Uri Blass wrote:

>I want to have some general search code(not only for chess) when it will be
>possible to implement failsoft,failhard,mtd and many search ideas by the right
>defines.
>
>I still do not have defines for different possibilities

I think you mean, write it in C and use #define.

I'd suggest instead writing it in C++ with templates, and avoiding #define.
Conditions can be handled by _if_ and by template instantiation. Compilers are
smart enough to do the right thing.

- it's clearer
- it's more expressive; you can do more things
- there's no efficiency loss if you do it right

If you're gonna do something generic, why not use generic programming?

  Jay



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.