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