??? 02/26/07 10:29 Read: times |
#133705 - how do you know? Responding to: ???'s previous message |
Oliver Sedlacek said:
Data hiding is a fundamental aspect of modern programming techniques. I don't think the OP was asking about modern programming techniques :-) Oliver said:
When you need to modify a file, it is a real bonus if you know which statements cannot have side effects outside the complation unit. Sure. And how do you know that? It is YOU (i.e. the module's author) who needs to determine which symbols are "safe" (e.g. including it into header file). Can't YOU simply do the same simply by leaving a comment, which symbols are "safe" and which are not? Doing this neatly at the top of the module source file? What is then the difference, indeed, if you NEVER intend to distribute the module in binary form? If it is also YOU who will use that module, with a bit of self-discipline you won't make anything dangerous even with exposed all symbols. The same applies to anybody with a bit of literacy... Without self-discipline, all chances are off, even with "properly" hidden symbols... JW PS. Header files as in C are a really flawed concept resulting from the lousy approach to everything by K&R&al. Have a look at Borland's Pascal units. |