Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Crafty internal iterative deepening

Author: Robert Hyatt

Date: 09:25:50 01/26/00

Go up one level in this thread


On January 26, 2000 at 12:09:10, Tijs van Dam wrote:

>On January 26, 2000 at 11:57:42, Robert Hyatt wrote:
>
>>It isn't ugly in the domain of software engineering.
>
>I understand completely that it is a very useful and readable solution (and I am
>also a software engineer BTW). But you have to agree with me that, when looking
>at it, it gives an ugly sight.
>
>I don't know any other solution that covers all uses of your construction. But
>what i use a lot is:
>
>_inline performalotofstuf(params_that_i_need_forthis)
>{
>   if(params_are_unusable)
>      return;
>
>   lots of stuf;
>
>}
>
>....
>performalotofstuf(params);
>....
>
>
>



I find that _much_ harder to read.  Because I have to run off and find
the code to "performlotsofstuff()" somewhere else.  I subscribe to the
Linus Torvalds 'standards' for writing code for the most part, although I
do break the rules for speed since that is very important in a chess
engine.

I don't personally consider the do { } while(0); construct to be ugly
when compared to a goto that is hard to track down...



>Of course this isn't any good if lots of stuf needs a lot of params. And one
>must have a good compiler for the inline construction to compile the same as the
>do{}while(0). But i think it is a prettier and more readable solution.
>
>Greets,
>Tijs
>
>>Bob



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.