Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: OOP: objects and methods

Author: Daniel Clausen

Date: 11:34:20 09/22/03

Go up one level in this thread


On September 22, 2003 at 13:27:54, Bo Persson wrote:

>On September 22, 2003 at 12:54:26, Daniel Clausen wrote:
>
>>On September 22, 2003 at 12:14:04, Robert Hyatt wrote:
>>
>>[snip]
>>
>>>The transposition table is a natural.  The opening book.  The endgame tables.
>>>The repetition history.  The killer move list.
>>
>>While I agree with these suggestions for classes, I think such classes alone
>>don't really make an engine OO.
>
>That's a matter of opinion.
>
>>What you basically mention so far is to replace
>>"struct XYZ" with "class XYZ" and convert the functions which work with these
>>structs closely (and typically take a pointer/reference to an object of XYZ) to
>>member functions of the respective class.
>
>Yes. A very good idea.
>
>>
>>If you do that, I'd call this a C++ engine but in the sense of a better C.
>
>That's the general idea of C++ in the first place.
>
>> I
>>wouldn't call it an OO-engine though.
>
>Ok, I would. :-)
>
>>The design of the program is exactly the
>>same.
>
>No, it is totally different.

Well, I think the _design_ is exactly the same, the implementation differs a
bit, but then that happens too if I write it in Pascal instead of C. Using
"class" instead of "struct" and "string" as opposed to "char x[42]" in a few
places doesn't change the design. (just the implementation)


>Ok, so you are one of the "fundamentalists"? Dynamic allocations only and
>everything virtual and polymorhic?

Yeah, I would probably count as a fundamentalist, but in the best sense of the
word! ;) That doesn't mean that OO means dynamic allocation only and everything
virtual/polymorphic.


>Some of us belive that using objects is object oriented. YMMV. :-)

In this case MM really V. ;)

Sargon

PS. There was a guy in CCC about one year ago who was working on an OO-engine
and who talked a little bit about the design of his engine. Anyone remember his
name? (he wanted to be to CCC last August! :p)



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.