Re: Circlemud design issues

From: George (greerga@CIRCLEMUD.ORG)
Date: 04/20/98


On Mon, 20 Apr 1998, James Turner wrote:

>I agree completely :)  We should use small functions to access the
>data (somewhat akin to C++ methods, except we have explicit function calls).

There isn't any gain in doing that unless you change your macros extremely
often, in which case it would reduce compilation at the expense of
overhead.

If you're thinking about type-checking, you already have that.

>I'm not meaning to say that VC++ is a bad compiler.  By alien I meant
>it wasn't taken into account during the original coding.  A Unix
>compiler and a Windows/Mac compiler are two fundamentally different
>beasts.  But with Cygnus' Gnu-win32, we don't really need to support
>VC++ as much as we do -- circle will compile and un unmodified under
>this compiler (I believe, please correct me if I'm wrong; I know
>though that it is very little work).

I'd rather support both than tell people they cannot use VC, especially
since they probably don't need Cygnus' compiler at that point.  Some people
prefer the GUI, I don't, but that's no reason not to handle it.

>> Here I agree with one of the other comments I read on this message.  Having
>> multiple .H files is a good thing.  It may make editing a bit harder, but
>> the amount of time it saves when recompiling makes it worth it.
>
>It also makes dependancy checking harder (though that is handlable by
>gcc -MM).  It doesn't save nearly as much time as people believe, though.

You can go through two extremes:
A) There is one header.
  Example: SillyMUD, with proto(s?).h
You make _any_ change and you recompile the whole MUD.

B) Every file has a different header.
Minimizes recompilation though you'll end up including headers you don't
need to over time.

CircleMUD currently does a mixture.  It has four header files vital to
everything which requires recompilation, but most of the files do not care
about the other headers.  If I make change to the OasisOLC header, for
instance, all I recompile is OasisOLC files, not the entire MUD.  If I
change the shop.h file, how many files get recompiled? One. (Two or three
if you have OasisOLC installed.) Again, a large time savings.  Not everyone
has a Dual Pentium 133 with 64 MB of RAM sitting on their desk.

>definite example I refer to in my response to George -- the conversion
>of the full "struct char_data" to CHAR_DATA throughout the code, as
>well as the other structures).

Load it into WordPad, do a search & replace and resave the file as text.

>The indent program (that George pointed out is already used) allows
>for uniform code indentation.  Picking a style is hard, but we should
>try to be consistant.  Remember, making diff's can be a mess if the
>indentation is different (though I hope everyone makes diffs straight
>from stock).

Try these three options to 'diff':

  -w  --ignore-all-space  Ignore all white space.
  -b  --ignore-space-change  Ignore changes in the amount of white space.
  -B  --ignore-blank-lines  Ignore changes whose lines are all blank.

Or this option to 'patch':

       -l, --ignore-whitespace

>Hewlett-Packard wrote it, I believe.  See my comments in another post;
>C++ isn't the direction circle should head IMO.

SGI has an STL also.  EGCS uses that one.

--
George Greer  -  Me@Null.net   | Genius may have its limitations, but stupidity
http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST