|pointer elimination in C email@example.com (Karen Miller) (1993-10-05)|
|Re:pointer elimination in C firstname.lastname@example.org (1993-10-06)|
|Re: pointer elimination in C email@example.com (Chris DONAWA) (1993-10-10)|
|Re: pointer elimination in C firstname.lastname@example.org (1993-10-19)|
|Re: pointer elimination in C email@example.com (Robin Popplestone) (1993-10-22)|
|Re: pointer elimination in C firstname.lastname@example.org (1993-10-22)|
|Re: pointer elimination in C email@example.com (1993-10-22)|
|Re: pointer elimination in C firstname.lastname@example.org (1993-10-28)|
|Re: pointer elimination in C email@example.com (1993-10-29)|
|Re: pointer elimination in C firstname.lastname@example.org.COM (1993-11-01)|
|Re: pointer elimination in C email@example.com (1993-11-03)|
|Re: pointer elimination in C firstname.lastname@example.org (1993-11-03)|
|From:||email@example.com (Stavros Macrakis)|
|Organization:||OSF Research Institute|
|Date:||Fri, 22 Oct 1993 20:52:16 GMT|
Robin Popplestone <firstname.lastname@example.org> writes:
...LISP for example, provides almost nothing but pointers...
It depends what you call a "pointer". The original K&R C notion of
pointer essentially an address, with the operations of dereference and
arithmetic. ANSI C has a somewhat more abstract notion, where pointer
arithmetic is only defined within an "object". Other languages have a
more strongly typed notion, and studiously avoid the word "pointer", e.g.
Algol 68 "references" and Ada "access types".
In the Lisp case, you don't really see pointers at all, since you can't
dereference them or do any sort of pointer arithmetic. Pure S-expressions
(no destructive operators) need not even be implemented using pointers.
And there have been implementations of Lisp where many "pointers" were not
pointers at all (cdr codes, etc.) -- although they had to be convertible
to pointers if a destructive operation was applied later.
typically only short integers and possibly short floats will not be
But all this is an implementation question, anyway. Some old Lisps did
NOT have non-pointer numbers at all.
C was, as they would say in Congress, -very unique- in providing pointer
arithmetic. This simply reflected the fact that good compilers had to be
shoehorned into a tiny computer, the DEC-11,
It's not so much good compilers that had to be implemented on the PDP-11,
but rather that simple compilers had to be able to generate good code.
(There was even a paper from the C group at one point arguing that
optimization was a bad thing, and that writing at a low level forced you
to be efficient.)
and there was a simple one-to-one mapping between something like
*x++ and one machine instruction.
I believe that even the first C compiler expanded this expression
before code generation. Anyway, the PDP-11 did NOT have address modes
for *++x and *x--.
Return to the
Search the comp.compilers archives again.