🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #1138

Re: Pointers as 3-tuples (Re: JLG's flogging of horses (was Re: Relationship between C and C++))

#1138
From: Jim Giles
Date: Mon, 09 Apr 1990 23:03
27 lines
1560 bytes
From article <1BT2FU7ggpc2@ficc.uu.net>, by peter@ficc.uu.net (Peter da Silva):
> [...]
>> (Actually, even recursive data structures may be implemented
>> with arrays, but it is less elegant in the general case.)
> 
> Exactly. Pointers are more general than arrays.

Pointers are more general than arrays in that they are free from bounds
checking and allow arbitrary aliasing.  Arrays are more general than
pointers in that they can be multiply dimensioned.  Arrays also tend
to be more legible and easier to optimize.  Neither should be used
to perform tasks better suited to the other.

> [...]
>> The point of this discussion is
>> that pointers are not, and should not be treated, as a useful method of
>> implementing arrays.
> 
> Not at all. Since pointers and arrays are isomorphic, that pointers are a
> useful method of implementing arrays becomes a tautology.

Pointers are only isomorphic to _one_dimensional_arrays_, and only if
their aliasing and freedom from bounds are both curtailed.  Having now
removed the only features that made pointers even remotely interesting
(as an array-like mechanism) I see no reason for them to remain.

J. Giles
Technical Details
Message-ID: <14316@lambda.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!lanl!lambda!jlg
References: <1BT2FU7ggpc2@ficc.uu.net>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!lanl!lambda!jlg
From: jlg@lambda.UUCP (Jim Giles)
Newsgroups: comp.lang.misc
Subject: Re: Pointers as 3-tuples (Re: JLG's flogging of horses (was Re: Relationship between C and C++))
Message-ID: <14316@lambda.UUCP>
Date: 9 Apr 90 23:03:22 GMT
References: <1BT2FU7ggpc2@ficc.uu.net>
Lines: 27