Re: [CODE] IS_CLASS function

From: Carlos Myers (farix@citynet.net)
Date: 12/11/01


From: "krenshala" <krenshala@JUMP.NET>
> I am currently looking at limits.c and noticed that checks for a
particular
> class are handled via IS_<CLASS>(ch) (e.g., IS_CLERIC(ch)).  I also see
that
> checks for particular AFF bitvectors are accomplished through the
> AFF_FLAGGED(ch,<FLAG>) function.
>
> Has anyone (aside from me :) considered coding an IS_CLASS(ch,<CLASS>)
> function that can replace the IS_<CLASS>(ch) functions?  I would think
this
> make a nice simplification of the existing code.

The problem I have with this is I think that will make things _harder_ to
read and understand.

Let's compare:

    if (IS_MAGIC_USER(ch))
        send_to_char("You are a magic user", ch);

to:

    if (IS_CLASS(ch, CLASS_MAGIC_USER))
        send_to_char("You are a magic user", ch);

Now tell me.  Which of those two arguments do you find easier to understand?

Carlos

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/24/03 PDT