Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/26/07 09:50
Read: times


 
#133695 - an example, please
Responding to: ???'s previous message
Andy Neil said:
David Gal said:
public This_Entire_File

Generally, this would be a bad idea.

One of the ideas behind Modular Programming is that each module only "publishes" (or "exposes") a certain set of functions and/or data that will be needed by other modules. Other functions and/or data are "private" to the module, and of no concern to the rest of the program.

Doing this helps reduce the risk of other parts of the program fiddling with things that it shouldn't and, thus, messing things up.


Can you please give us a relevant negative example?

Andy, I don't think what you say is quite true. Unless you have a memory management which _effectively_ disables other modules from fiddling with "hidden" data = a hardware which you don't have in '51, there is no reason for hiding the symbols (other than you don't want to disclose them not to leak out information the internal whereabouts, as in closed source software). The only thing gained by hiding the internal symbols might be the decreased risk of symbols collision (redefinition), but that's resolved as an error when compiling/assembling, isn't it...

This is not to say that is should be a common practice to expose everything. I just want to say, that there is no "one size fits all" in engineering - well, basically, you said the same above, isn't it...

JW


List of 53 messages in thread
TopicAuthorDate
lame linker related question            01/01/70 00:00      
   How else will they know?            01/01/70 00:00      
      why the **** not???            01/01/70 00:00      
         I so disagree            01/01/70 00:00      
            Small addition            01/01/70 00:00      
            how do you know?            01/01/70 00:00      
         Not the only reason!            01/01/70 00:00      
            Can I throw in another problem here...            01/01/70 00:00      
               it is IS a plain include...            01/01/70 00:00      
                  Thanks Jan...            01/01/70 00:00      
                  Proper Solution            01/01/70 00:00      
                     the problem is ...            01/01/70 00:00      
                     what???            01/01/70 00:00      
                        corrections            01/01/70 00:00      
                           path???? Which path?????            01/01/70 00:00      
                              do you REALLY think that a compiler/linker maker w            01/01/70 00:00      
                                 1 experiment > 3e8h words            01/01/70 00:00      
                                    experiment #2: SDCC            01/01/70 00:00      
                                    very hard            01/01/70 00:00      
                                       but it does not matter!            01/01/70 00:00      
                                          you suffer from a gross misconception            01/01/70 00:00      
               a common issue            01/01/70 00:00      
      i'm looking for something much simpler....            01/01/70 00:00      
         Well, that's fairly simple ... ?            01/01/70 00:00      
         Sure.            01/01/70 00:00      
         Contradiction!            01/01/70 00:00      
            not really.....            01/01/70 00:00      
               give an example            01/01/70 00:00      
                  example            01/01/70 00:00      
                     include ?            01/01/70 00:00      
                        Jon, I didn't know...            01/01/70 00:00      
                           I did not build a truck            01/01/70 00:00      
                     no            01/01/70 00:00      
                        Jan, please read my question            01/01/70 00:00      
                           chop it with axe            01/01/70 00:00      
                              chop & glue            01/01/70 00:00      
                                 ok ok ok            01/01/70 00:00      
                     You need to understand            01/01/70 00:00      
   Not quite the right question.            01/01/70 00:00      
   On modular programming            01/01/70 00:00      
      an example, please            01/01/70 00:00      
         \"Lead us not into temptation\"            01/01/70 00:00      
            the temptation is there anyway            01/01/70 00:00      
               Use all the help the tools can give you!            01/01/70 00:00      
                  if there ARE reasons NOT to use the \"tools\"...            01/01/70 00:00      
                     Famous last words.            01/01/70 00:00      
               A real life analogy:            01/01/70 00:00      
                  thin ice            01/01/70 00:00      
               Remove the Temptation            01/01/70 00:00      
                  Do you want less temptation?            01/01/70 00:00      
                     Thank you            01/01/70 00:00      
                     Cohesion & Coupling            01/01/70 00:00      
         Christoph put it nicely            01/01/70 00:00      

Back to Subject List