Re: Circlemud design issues

From: Chris Jacobson (fear@ATHENET.NET)
Date: 04/21/98


On 4/21/98 11:27 AM, James Turner (turnerjh@XTN.NET) stated:

>But then you have to put the limit in every time you set the char's
>strength.  If something says get, it is implied it gives a value.
>Since C can't give references, this obfuscates the role of GET_*.
>Allowing code to assign STR too high can result later in overruns in
>references to the lookup tables.  Then, when that happens, it isn't
>trivial to find out what assignment made the STR too large.  But
>having a setStrength function would take care of that in short order,
>eliminating the risk (though not the large assignment, which could
>produce a runtime warning, as opposed to a crash at some vague later
>point).

Now it sounds like your arguing in favor of C++ - weren't you NOT in
favor of it before?  This is the perfect situation for C++, of course -
member functions.  Plus it would clean up a lot of code.

- Chris Jacobson


     +------------------------------------------------------------+
     | 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