nightfall at user1.inficad.com
Sun May 25 04:06:46 New Zealand Standard Time 1997
> >>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
More information about the MUD-Dev