home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / pascal / 8562 < prev    next >
Encoding:
Internet Message Format  |  1993-01-27  |  1.9 KB

  1. Path: sparky!uunet!ukma!gatech!news.ans.net!cmcl2!adm!news
  2. From: lee@cpu.us.dynix.com (Lee Crites)
  3. Newsgroups: comp.lang.pascal
  4. Subject: Optimizaion with Objects....
  5. Message-ID: <35257@adm.brl.mil>
  6. Date: 27 Jan 93 22:57:18 GMT
  7. Sender: news@adm.brl.mil
  8. Lines: 41
  9.  
  10.  
  11. Here's a nice juicy one that will thrill the hearts of the techies out
  12. there...
  13.  
  14. I know that TP has an optimizing compiler, which removes unused/unneeded
  15. code from your program before generating the .EXE file.  This is fine, and
  16. I have exploited this to the max in some of the units that I have created.
  17.  
  18. Now for the question:  does it also remove unused methods from an object?
  19.  
  20. I would assume that this question is NO in the case of compiling a UNIT,
  21. since it is assumed that you might spawn children off of it later, and
  22. need all of the method(s) later.  But, what about in a program, where the
  23. object is in one of the units that I include?
  24.  
  25. Lets take a really obvious example.  What if I had an object, TCanDoItAll,
  26. with 1,000 methods and fields.  In one program, I include this object, and
  27. use only 5 of the methods and fields.  Will the optimizing step remove the
  28. other 995 methods and fields?
  29.  
  30. I guess that I could experiment with this, and generate a little (?) test,
  31. but before I spend hours at the keyboard making methods like AA, AB, AC,
  32. ... ,ZZZ, I thought that I'd ask, just in case somebody else knew one way
  33. or the other.
  34.  
  35. This will dramatically affect the way that we continue with our conversion
  36. into OOP.
  37.  
  38. Thanks muchly, in advance, for any/all help.
  39.  
  40. P.S. Yes, I've RTFM, and couldn't find the answer.  If it's in there,
  41. please give the reference.
  42.  
  43. P.P.S.  If you want to reply to me instead of the forum, I'll either
  44. forward it on, or just summarize what I get. 
  45.  
  46.            =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  47.             lee@us.dynix.com | If it ain't broke yet,
  48.                              |   let me have a shot at it....
  49.            =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  50.  
  51.