[MUD-Dev] Languages

Nathan Yospe yospe at hawaii.edu
Sun May 25 12:55:13 New Zealand Standard Time 1997

On Sun, 25 May 1997, Adam Wiggins wrote:

:> >>over... because none of the objects can make any assumptions about
:> >>the others, so they can't ever take for granted that someone else has
:> >>validated the data. If they did, they'd break the whole reuse thing. 
:> >
:> >Actually that's what I've been doing with stratight C and procedural
:> >programming for years.  I've always been a big fan of heavy sanity
:> >checking.  Then OOP came along and made it de rigeuer.
:> I do heavy sanity checking on input. Once. Then I know it's sane. It's
:> really not likely to go apeshit over the course of the program.
:Wait until you get to work on a large-scale project with multiple
:programmers, re-used components, and a timescale such that you forget
:what some of your own code does during the course of the project.
:It's *amazing* what can slip through the cracks when you're programming
:by yourself on a small project; now imagine what can happen when you've
:got several people working on a project, modules which were written by
:outside sources, etc etc.  Sanity checking is also great for finding
:those really nasty bugs, ie stack or heap overwrites which don't
:cause seg faults.  Really there's no reason for a simple if statement
:at the top of every function to make sure that everything is okay...and
:checking return values all the time isn't that hard once you get in the

I've got try/throw/catch blocks around everything. I just wish g++ had the
same capacity with those that codewarrior does... zero overhead on
success, massive when an exception is thrown. That's how it _should_ be.
Exception handling is really the way to go with programming, if its
available. Not to mention that every execution of something generated in
my internal language is done in a try block. The try block throws at
anything fishy, scolds the person who authored the bad code, and kills
execution. I'm a very suspicious person.

   __    _   __  _   _   ,  ,  , ,  
  /_  / / ) /_  /_) / ) /| /| / /\            First Light of a Nova Dawn
 /   / / \ /_  /_) / \ /-|/ |/ /_/            Final Night of a World Gone
Nathan F. Yospe - University of Hawaii Dept of Physics - yospe at hawaii.edu

More information about the MUD-Dev mailing list