Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!rutgers!lll-crg!nike!ucbcad!ucbvax!WARD.CS.WASHINGTON.EDU!PATTIS From: PATTIS@WARD.CS.WASHINGTON.EDU (Richard Pattis) Newsgroups: net.lang.mod2 Subject: Should all opaque types be pointers? No. Message-ID: <12248635590.12.PATTIS@WARD.CS.WASHINGTON.EDU> Date: Tue, 21-Oct-86 16:04:50 EDT Article-I.D.: WARD.12248635590.12.PATTIS Posted: Tue Oct 21 16:04:50 1986 Date-Received: Wed, 22-Oct-86 06:14:28 EDT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 15 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 -------