Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cornell!uw-beaver!uw-june!pattis From: pattis@cs.washington.edu (Richard Pattis) Newsgroups: comp.lang.modula2 Subject: Current Modula-2 Standard/Popular Implementations Message-ID: <12695@june.cs.washington.edu> Date: 1 Aug 90 21:37:34 GMT Organization: U of Washington, Computer Science, Seattle Lines: 19 Summary: Restrictions on opaque types? What are the current restrictions placed on opaque types? In the old days, they could be any 1-word type (admittedly, a bit loosely defined). Then I heard the Standard said that they must be pointers. Here is my problem with that. Suppose I am implementing an ADT that includes the ability to store and retrieve values (think of a table). I would like to have cursors to the values stored in the ADT. I would like both the type of the ADT and the type of its cursors to be opaque. If I implement the ADT as a linked list, then both types would be pointers; if I implement the ADT as a pointer to an array, the types would be a pointer and an integer respectively. But if opaque types must be pointers, I must then implement the cursor type as a pointer to an integer, or play games with the type system. Any informed opinion out there about the Standard? About what the popular M-2 compilers say? Rich Pattis