🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #1771

s

#1771
From: Jim Giles
Date: Fri, 19 Oct 1990 21:27
34 lines
1960 bytes
> You refuse to acknowledge that sometimes pointers can be used without
> adding an index first,

I do not!  I refuse to acknowledge that this optimization is the
exclusive province of pointers!  If you can precompute the index, the
compiler can apply the data flow graph to find the _use_ of the index
and _always_ add the array base address - at _exactly_ the same point
that _you_ would manually precompute the pointer (or anywhere in
between - where ever is most efficient).  I personally find that the
compiler's ability to do this saves me a lot of drudgery.

> [...]                    that some of us don't mind using the most
> appropriate available tool for the job,

I have always spoken _in_favor_ of this concept.  Pointers are (maybe)
the most appropriate tool for memory manager internals and memory mapped
device drivers - little else.  So, the issue is to attack the "available"
component of your criterion.  In C, pointers are practically the _only_
tools available.  In future languages, I hope that pointers (if present
at all) are little used curiosities (as they deserve to be).

> [...]                                   and that packed array tries
> cannot be expressed as recursive data structures.

First: I don't believe in the "cannot be expressed" part of your
statement.  Second: packed array tries _are_ implemented as arrays -
so the issue is irrelevant to this discussion anyway (which is _still_
mostly about whether pointers are really _needed_ or not).  Or, maybe
it _IS_ relevant, since it is an application that you seem to consider
important which DOES NOT use explicit pointers.

End of chapter 6

J. Giles
Technical Details
Message-ID: <66259@lanl.gov>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!sun-barr!olivea!mintaka!yale!cmcl2!lanl!jlg

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!sun-barr!olivea!mintaka!yale!cmcl2!lanl!jlg
From: jlg@lanl.gov (Jim Giles)
Newsgroups: comp.lang.misc
Subject: s
Message-ID: <66259@lanl.gov>
Date: 19 Oct 90 21:27:02 GMT
Organization: Los Alamos Natl Lab, Los Alamos, N.M.
Lines: 34