style

From: Edward J Glamkowski (eglamkowski@angelfire.com)
Date: 03/26/00


Ok, I found an "old" (pl14) MUD I was working
on and decided I liked it and so went to get
the patches to patch it up to pl17.  It is so
hopelessly modified that I didn't even bother
to run the patch program but am doing it by
hand.  I'm still on the 14-15 (friggin' HUGE
patch, I might add...) and have noticed some
(admittedly fairly minor) things that I don't
like.  Maybe they are "fixed" in 15-16 or 16-17,
but I'm not holding my breath, so I'm going to
complain loudly about them now ;)


1.  Initializations of pointers being removed.
In many cases, pointers, when declared, were
immediately set to null, or zero, e.g.:
struct obj_data *foo = 0;
The patch is removing these intializations.
This, to me, is a Bad Thing (tm).  In fact,
not only should they not be removed, but
everywhere else there isn't such an init.
during declaration, it needs to be added!
It's just safer that way (and easier to
debug later).


2.  Return statements at the end of void
functions are being removed.  While it is
true they are technically not necessary,
they make for more consistency (every other
function that returns something has a return
statement, and if you want to return in the
middle of a void function you need a return
statment) and readability (a closing brace at
column 0 is not always guarenteed to be an end
of function marker - some people are extremely
sloppy in formatting their code, I've seen it
on quite a few patches and snippets for Circle
MUD, not to mention elsewhere).  I say ALL void
functions should have a return statement at the
end, and this nonsense of removing them needs to
be stopped and reversed.


Um, there was a third thing but it has slipped
my mind...  Ah well, that should be busy work
enough for now anyway ;)



Angelfire for your free web-based e-mail. http://www.angelfire.com


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



This archive was generated by hypermail 2b30 : 04/10/01 PDT