home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / misc / 3580 < prev    next >
Encoding:
Text File  |  1992-11-10  |  2.0 KB  |  43 lines

  1. Newsgroups: comp.lang.misc
  2. Path: sparky!uunet!ukma!darwin.sura.net!zaphod.mps.ohio-state.edu!menudo.uh.edu!sugar!ficc!peter
  3. From: peter@ferranti.com (peter da silva)
  4. Subject: Re: Pointers
  5. Message-ID: <id.6HVU.OC@ferranti.com>
  6. Organization: Xenix Support, FICC
  7. References: <1992Nov4.093545.15950@rdg.dec.com> <Bx7oAz.7Lp@mentor.cc.purdue.edu> <1992Nov5.014143.15635@newshost.lanl.gov>
  8. Date: Tue, 10 Nov 1992 21:57:13 GMT
  9. Lines: 32
  10.  
  11. In article <1992Nov5.014143.15635@newshost.lanl.gov> jlg@cochiti.lanl.gov (J. Giles) writes:
  12. >    First: in both, you should avoid having loops.  In the case of GO TO,
  13. >    you should try not to branch backward.  In the case of pointers, you 
  14. >    should try to avoid cyclic data structures.
  15.  
  16. If you think I'm going to give up doubly-linked circular lists because you
  17. don't like pointers, you've got another think coming.
  18.  
  19. >    Second: in both, you should avoid aliasing.  In the case of GO TO,
  20. >    you should avoid branching to the same label for many disparate
  21. >    reasons.  In the case of pointers, you should try to avoid have
  22. >    two pointers to the same thing *at all*.
  23.  
  24. Same objection.
  25.  
  26. >    Third: you should avoid non-local references.  In the case of GOTO,
  27. >    you should not branch from one program unit to another (even if you
  28. >    *know* the target is all statically allocated or that it's still on
  29. >    the active call stack, etc.).  In the case of pointers, you should 
  30. >    avoid pointing at separately generated data - like from one global
  31. >    array to a different one or from one complicated structure to
  32. >    another.
  33.  
  34. OK, I'll throw away all my generic symbol table code because it's
  35. politically incorrect. Not.
  36.  
  37. As for your analogies, an analogy is like instant coffee.
  38. -- 
  39. Peter da Silva / 77487-5012 USA / +1 713 274 5180
  40. true(<<VV$@\\$'&O 9$O%'$LT$&$"V6"$&$<4$?'&$ #I&&?$=$<<@)24 24 scale 3 21 moveto
  41. {dup 36 eq{pop not}{dup 7 and 4 sub exch 56 and 8 div 4 sub 2 index{rlineto}{
  42. rmoveto}ifelse}ifelse}forall stroke pop showpage % Har du kramat din varg idag?
  43.