This is the mail archive of the
xconq7@sources.redhat.com
mailing list for the Xconq project.
Re: Meaningful parameters.
- From: Hans Ronne <hronne at pp dot sbbs dot se>
- To: "Stanley Sutton" <sutton at t-surf dot com>
- Cc: xconq7 at sources dot redhat dot com
- Date: Sat, 3 Aug 2002 23:37:18 +0200
- Subject: Re: Meaningful parameters.
>I'm pretty uniformly changing *unit to *actor, m to material, n to
>amount. After that, things are a bit less uniform. It's wordier (more
>wordy?), but I think it reads a little better. Of course, it means
>backtracking and changing things I've already documented, and changing a
>fair amount of code, but it's probably worth the effort.
Naming units after what they actually do (*actor, *attacker etc) makes
sense when we have more than one unit, which is true in many of the action
functions. The same applies to sides.
I don't think it is a good idea to use "material" instead of "m", though.
If anything, it should be "mtype" to avoid confusion (see below). The four
basic types are consistently abbreviated as "u", "t", "m" and "a"
everywhere, not only in the code but also in the GDL. If we change "m" we
should also change "u" to "utype" everywhere, which would be a huge amount
of work (note that using "unit" instead would really confuse things).
I don't think it is too much to ask of xconq hackers that they learn what
"u", "m", "t" and "a" stand for. Some abbreviations do make life simpler.
Hans
Hans Ronne
hronne@pp.sbbs.se