Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: question about errors when I change my C code to C++

Author: Uri Blass

Date: 09:40:18 02/25/03

Go up one level in this thread


On February 25, 2003 at 12:31:14, Pat King wrote:

>On February 25, 2003 at 11:51:15, Uri Blass wrote:
>
>>On February 25, 2003 at 11:42:24, Pat King wrote:
>>
>>>On February 24, 2003 at 18:00:25, Uri Blass wrote:
>>>
>>>> (long story with easy ending)
>>>>
>>>>I see that I did not include it in the right order and now I have no problem.
>>>>
>>>>Uri
>>>
>>>I would submit that being dependent on include order, though perhaps not a bug,
>>>is bad practice. All my includes are in alphabetical order. While this doesn't
>>>preclude such dependencies, enforcing an arbitrary order at least ensures they
>>>are repeatable :)
>>>
>>>Pat
>>
>>data.h is varaibles when defs.h is definition.
>>I learned it from tscp.
>>
>>some varaibles are dependent on definition so I need to include defs.h first
>
>I would submit that this is a bad feature of tscp.

so what do you think?

Do you suggest to include all the definitions and the external varaibles in the
same file?

I do not see why it is a problem except the error that I reported and finding
and fixing the error took me only few minutes.

>
>>
>>Maybe it is better to have only one file for them but when I look in source code
>>of Crafty I see that it has a lot of files in the project.
>>
>>I do not understand what is the advantage of having a lot of files on the
>>project.
>>
>>Uri
>
>A lot of files, if organized correctly, can mean quick compiles after small
>changes. If a small change produces a big recompile, then it's a sign that your
>program's structure might need rethinking.
>
>Pat

compiling the program takes a short time and it is no problem even to compile a
file with more than 5000 lines.

Uri



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.