🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #5023

Structural Type Equivalence in Modula-3: Why?

#5023
From: Glassy
Date: Tue, 13 Mar 1990 03:09
34 lines
1361 bytes
Page 2, Sect. 2, Par. 1 Line 1 of "Modula-3 Report (revised)" by
Cardelli, Donahue et al indicates Modula-3 uses structural type
equivalence, instead of name type equivalence used in Modula-2.

I thought (perhaps mistakenly) that name equivalence was both
easier to implement, -and- more secure than structural equivalence.
If this is true, why does M-3 get structural equivalence?  More
than one instructor of mine has lambasted Pascal for allowing
code like

type
	apple = integer;
	orange = integer;

var
	a : apple;
	o : orange;

begin
	...
	a := o;
	...
end.
----------------------------------

Is there some (obvious?) system programming application that is
facilitated by structural (vs. name) equivalence?

If this issue/question has already been beat to death, my apologies.

Thanks,

Lou Glassy
icsu8209@caesar.cs.montana.edu
Technical Details
Message-ID: <3508@caesar.cs.montana.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!caesar.cs.montana.edu!icsu8209

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!caesar.cs.montana.edu!icsu8209
From: icsu8209@caesar.cs.montana.edu (Glassy)
Newsgroups: comp.lang.modula2
Subject: Structural Type Equivalence in Modula-3: Why?
Message-ID: <3508@caesar.cs.montana.edu>
Date: 13 Mar 90 03:09:21 GMT
Sender: news@caesar.cs.montana.edu
Reply-To: icsu8209@caesar.cs.montana.edu (Glassy)
Distribution: usa
Lines: 34