Author: Bas Hamstra
Date: 09:09:42 11/05/97
Go up one level in this thread
>I don't recall saying there is one class only, but it is true that the >Position class is the main one. I have no idea why a single-class >program is not truely object-oriented (if that's what you mean). Why not >? Oop, I don't know. Because if you would browse trhu the code it would seem sort of a C program with all data global. Ok, distinction between private and interface functions, but working with enourmos objects still doesn't seem so handy? Shouldn't one work with smaller easier to control "parts" somehow? Thank you very much for the pointers. [constructing objects only once] >This is quite possible, but a useful class usually gets instantiated >several times. Maybe it's best to think of classes simply as types >(which is really what they are). Think of your classes as you think of >'int' and 'char'. In a C program, would you make an effort to use 'int' >only once ? There is also no special reason to allocate from the heap. >All other ways of declaration are possible, and it all really depends on >what you want to do with your objects. I agree, but for time critical parts I would like to avoid expensive constructors. And I need only one and the same Board anyway (including a Zobrist table etc). And only one HashTable. And one graphical board. So why constructing over and over? Regards, Bas Hamstra.
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.