🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Richard Pattis Tue, 21 Oct 1986 20:04
Should all opaque types be pointers? No.
#586
Author: Richard Pattis
Date: Tue, 21 Oct 1986 20:04
15 lines
1351 bytes
  I would like to complain about opaque types being pointers only. When I teach
ADTs, I teach a Table, with a few operations that manipulate cursors (a unifi-
cation of indexes and pointers).  One can locate an element and get a cursor;
one can use the cursor to retrieve/update information from/to a table.  The
definition module of the Table ADT exports opaquely the cursor type.  One
implementation of Table uses arrays, where the cursor type is integer.  Another
implementation uses pointers for cursors.

  This example will be impossible with the new standard.  Couldn't one say
that opaque types must allow for the largest of all the primitive (so called,
one-word) types?  What is the rationale for restricting it to pointers only?

Rich
-------
Re: Should all opaque types be pointers? No.
#589
Author: randy
Date: Thu, 23 Oct 1986 02:36
9 lines
1129 bytes
If one allows assignment and in/equality test of opaques, and one allows non-
pointers to be opaques, then a program may become dependent on whether a
particular implementation stuffs an integer into those n bytes, or a pointer.
The other approach would be to disallow comparison or assignment.  The latter
has its proponents among the ADT community.

An aside: Having received two strange phone calls, it should be explained
          that Charles and I know eachother, and no one was actually slurring
          the other's parent.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads