jlg@lanl.gov (Jim Giles) (10/20/90)
Sorry to post this twice - I forgot to change the working title of the post when editing the subject line. Please refer any commentary to this post with the above title: it's somewhat more mnemonic. ______________________________________________________________________________ > 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 would be 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