??? 02/26/07 13:52 Read: times |
#133718 - Remove the Temptation Responding to: ???'s previous message |
Jan said:
While it is true that you won't use explicitly a symbol which you won't make public, the temptation is still there for those which you make public, for which you have to set up "rules" (with the same = nil support in both in C and asm) anyway.
For example, you cannot declare a public symbol "read only". Or you cannot distinguish a value from an address in asm (as in mov r0,address vs. mov r0,#address, with an intention to do something with @r0 later). Isn't programming much of an art of self-control, rather than just churning out lines of - well - code? :-) If you're working by yourself on small program, and have the mental horsepower to keep everything organized in your head, then I'd say fine -- put everything in one file and live happily ever after. The problems start when the programmer finds that he can't remember everything any more -- maybe because the program got too big, or maybe because a few months passed, or maybe because there are now two programmers (or three, or ...) working on the same project. At that point (actually before that point!), you need to exercise that self-control that you are talking about and set things up so that they are manageable. In general, that means partitioning the code into modules with narrow and well-defined interfaces, minimizing (eliminating if you can) the use of global variables, etc., etc., etc. We beat this subject well beyond the point of death a few months ago. Check here for an entry into that thread. -- Russ |