Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: what classes all the serious C++ chess programs have?

Author: Anthony Cozzie

Date: 06:34:38 08/12/04

Go up one level in this thread


On August 12, 2004 at 08:01:49, Tord Romstad wrote:

>On August 11, 2004 at 15:33:20, Bo Persson wrote:
>
>>On August 11, 2004 at 05:22:51, Tord Romstad wrote:
>>
>>>
>>>I also prefer to partition my source code into many small files, where each
>>>file contains just a small number of closely related functions.  I don't see
>>>what this has to do with classes.  It seems like to completely unrelated
>>>issues to me.
>>
>>This might be your problem. :-)
>>
>>If you put your "closely related functions", together with the small amount of
>>data they work on, in a small structure - there you've got your class!
>
>And the only practical difference compared to using structs and functions
>with these structs (or pointers to them) as arguments is that I forced
>to use the x.y() syntax rather than the y(x) syntax which I like so much
>better.
>
>As long as I don't need inheritance or functions which behave differently
>depending on the type of their arguments, I don't see why I would want
>classes.
>
>Tord


I actually don't mind the x.y() syntax, except when people go overboard and
start creating code like x.GetInterleavedMemoryPagesWithLocking().  I really
can't stand the Java/MS alternating caps naming convention.  I am going to try
your indenting style a bit though, and see how I like it.

anthony



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.