Re: [Proposal][bpl12] More aesthetically correct variable names

From: Daniel Koepke (dkoepke@CALIFORNIA.COM)
Date: 08/30/97


On Sat, 30 Aug 1997, Chris Jacobson wrote:

-+unsigned short

ush_int

-+signed short
-+short

sh_int

-+unsigned long
-+signed long

Hrm, I dunno if there's a "ulong" or "uint". There ought to be. Note
that Circle's compatibility really is limited to platforms that have
32-bit (or more) integers, because it uses "int" for many bitvectors
that have more than 16 flags in stock. Of course, this could easily
be considered a bug and changing all of the "int"s to "unsigned long"
would make more sense. Or worse the configure script can figure out
the sizeof(int). :)

Then again, since everyone's talking about C++ all of sudden as if it
was something worth a programmers time (I still hate C++; which doesn't
mean that I didn't learn to program in it, but does mean: I hate it).

-+respectively.  The reasoning behind this is it allows for easier instant
-+recognition of sizes and type, and is in general faster to type (for
-+some).  As you can tell, the format is:

I seriously believe that any programmer worth a grain of sand will know
the sizes of the integers on his platform. While I don't expect newbie
coders to know this type of stuff instantly, it's really quite simple
to figure out, and can be extremely helpful in the long run. Changing
Circle in this manner just makes the code look less like other programs,
and may serve to confuse newbies more than traditional type names. That
is, often times they purchase books that explain the types and sizes
of the types; but more likely those books don't explain that type names
can be changed with "typedef" and can be pretty much anything.

Even worse, is the fact that 'unsigned int' could be 16 or 32-bits
depending upon your platform (as stated above); so it'd require the
configure script to write out the 'typedef' section after doing
a series of sizeof()s.


--
Daniel Koepke -:- dkoepke@california.com -:-  [Shadowlord/Nether]
Think.


     +------------------------------------------------------------+
     | 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/08/00 PST