> ...about having to "forward define everything"? So, you > don't write organized and thought out code, you just want to write "stream > of consciousness" code. Golly, it must be so demanding to actually > ORGANIZE your thoughts before you start writing. Yeah, defining things in > the top of the function/procedure/application seems like a drag but it also > makes things more readable because you know where to look to find the > declaration of variables/constants and, therefore, it is easier to figure > out what their scope is. Forward declarations of functions and procedures > makes it easier to know what all is in the bloody unit/module. too.
I find really convenient to see all the variables in a routine defined in one place. Often, just by seeing the variables without all the clutter of the code, I can accurately guess which one of several likely algorithms was actually coded. I *really* like the java concept of forcing the programmer to deal with the exceptions the routine could raise whenever the routine was called. For two reasons: 1) As the coder of the routine, I use the exception mechanism as a way to both organize and record my thoughts on "what could go wrong in this routine?" 2) As a project manager, I know that each programmer using a routine will have to at least consider all the things that could go wrong when they write their programs using the routine. They may put in a pair of empty curly braces to handle the exception out of laziness, but then they are accountable to me without the excuse of "oops. didn't know / remember about that error code." > As for the circular reference problem, it has been over 9 years since I ran > into that problem in my code. I've been programming day in and day out (and often night in and night out too!) for over 20 years. I've got hit by the circular reference problem twice. Took about 60 seconds all told to fix the two of them. __________________________________________________ Delphi-Talk mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi-talk
