🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #1023

Current Modula-2 Standard/Popular Implementations

#1023
From: Richard Pattis
Date: Wed, 01 Aug 1990 21:37
19 lines
1352 bytes
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
Technical Details
Message-ID: <12695@june.cs.washington.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cornell!uw-beaver!uw-june!pattis

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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?