guido@mcvax.UUCP (Guido van Rossum) (06/05/84)
Doug Gwyn: > I think it is better to init the extern data explicitly > (even if it is zero) in a module that deals with the data. ^^^^^^^^^^^^^^^^^^^^ While I agree with the rest of what you say (less initialized data, inited in a separate module), I don't agree with the idea of initializing zero data explicitly. Reasons: 1) Initialized data costs space in the load module, while uninitialized (defaulting to zeros) does not; this may save disk space if you init large arrays. 2) Some loaders have an option to make any initialized data read-only, and thus SHARABLE. Occasionally this can come in handy. You can't do many useful things with read-only zeros... (Yes this is of course non-portable but the idea is that you write your program so that it doesn't write to the read-only portions, so whethr they are really read-only doesn't matter except for efficiency. How's that for some flammable material? -- Guido van Rossum, "Stamp Out BASIC" Committee, CWI, Amsterdam guido @ mcvax