Re: Circlemud design issues

From: James Turner (turnerjh@XTN.NET)
Date: 04/20/98


George <greerga@CIRCLEMUD.ORG> writes:

> >victim = mud_calloc(1, sizeof(CHAR_DATA));
> >
> >as opposed to
> >
> >CREATE(victim, 1, CHAR_DATA);
> >
> You forgot to cast the mud_calloc return value away from 'void *'.
>
> Create 'victim' consisting of 1 'struct char_data'.

There's no need to cast up.  Promotion is automatic.  It's casting
down (losing information) that you need to be explicit.

However, K&R 2nd edition states you can assign either way (promote
from or demote to a void) legally (though compilers will warn).

> >If you're given a person, then you can only find the people _after_
> >them in a room -- not before.  You still have to refer to
> >world[IN_ROOM(ch)].people to get the entire list.
>
> Yes, but you just referenced the list from an arbitrary member using the
> world array association.  I believe that qualifies the situation.

No... you're mistaken.  IN_ROOM(ch) returns an offset (as you know),
not a pointer.  You gave me a character and I returned a list
containing those in the same room.  Going through the world array
doesn't enter into the topic being discussed, ie, accessing a list
from an arbitrary member without any a priori knowledge.

> As for weak inheritance, bad name for it.  Not a bad idea though, the Linux
> kernel uses it, but it doesn't stand out as a real need for CircleMUD.

Bad name, I agree, but that is what is happening -- inheritence
without type checking.  A _lot_ of programs use it, not just the
kernel.

As for being a real need.  What do you define as a real need for a
publicly available code base?  Some things I think are very important,
particularly in a project designed for later enhancements by users:

1. Robustness
2. Stability
3. Flexibility
4. Reliability
5. Predictability (both in structure and in operation)

Using "weak inheritance" can help achieve all of those.

Circle can move forward in two ways.  One is adding features, the
other is cementing the base more firmly.  One without the other is a
bad direction to move.  I'm all for adding features -- but that seems
to be all that is really discussed here.  We need to work on the
foundations as well.

--
James Turner               turnerjh@xtn.net
                           http://www.vuse.vanderbilt.edu/~turnerj1/


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