home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.modula2
- Path: sparky!uunet!mcsun!news.funet.fi!network.jyu.fi!sakkinen
- From: sakkinen@jyu.fi (Markku Sakkinen)
- Subject: Re: mail delivery error
- Message-ID: <1992Nov13.082328.7329@jyu.fi>
- Organization: University of Jyvaskyla, Finland
- References: <5897@balrog.ctron.com> <1992Nov11.102409.12183@jyu.fi> <1992Nov11.134940.19557@titan.tsd.arlut.utexas.edu>
- Date: Fri, 13 Nov 1992 08:23:28 GMT
- Lines: 30
-
- In article <1992Nov11.134940.19557@titan.tsd.arlut.utexas.edu> larry@tsd.arlut.utexas.edu (Larry Maturo) writes:
- >In article <1992Nov11.102409.12183@jyu.fi> sakkinen@jyu.fi (Markku Sakkinen) writes:
- >> ...
- >>That has obviously been the main reason for eliminating enumerations.
- >>And even this rationale is very weak. Only record types can be extended
- >>in Oberon, not atomic types nor arrays.
- >>
- >Enumerations are often used as the discriminent in variant records. In Oberon
- >you declare different records that are extensions of a common record. You also
- >delcare a different pointer type to each one and the type name of the pointer
- >takes the place of the enumeration so you get the effect of enumerations, but
- >it's extendable over module boundries. Pretty neat!
-
- That's only one of the many useful purposes of enumerations!
- Furthermore, Oberon's type extensions cannot do all the things
- that are possible with tagged variant records (and vice versa).
- With variant records, you can change the variant of the object itself.
- With type extensions, you can only make a pointer point at an object
- of another related type: that does not affect the original object
- nor any other pointers to it.
-
- ----------------------------------------------------------------------
- Markku Sakkinen (sakkinen@jytko.jyu.fi)
- SAKKINEN@FINJYU.bitnet (alternative network address)
- Department of Computer Science and Information Systems
- University of Jyvaskyla (a's with umlauts)
- PL 35
- SF-40351 Jyvaskyla (umlauts again)
- Finland
- ----------------------------------------------------------------------
-