home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!agate!ucbvax!MAIL.CASI.NASA.GOV!thutt
- From: thutt@MAIL.CASI.NASA.GOV (thutt)
- Newsgroups: comp.lang.modula2
- Subject: mail delivery error
- Message-ID: <9211091022.A01745@MAIL.CASI.NASA.GOV>
- Date: 9 Nov 92 15:22:39 GMT
- Sender: usenet@ucbvax.BERKELEY.EDU
- Reply-To: Modula2 List <INFO-M2%UCF1VM.BITNET@cmsa.Berkeley.EDU>
- Organization: The Internet
- Lines: 74
-
- ---------------------------- Forwarded with Changes ---------------------------
- From: MAILER%INDYCMS.IUPUI.EDU@UICVM.UIC.EDU at SMTPLINK-CASI
- Date: 11/9/92 9:54AM
- To: thutt at casi
- Subject: mail delivery error
- -------------------------------------------------------------------------------
- -=> (again) Quoting Roland Frederic to All <=-
-
- RF> Hi! I'm new here and I recently read a text file about Modula-2 and
- RF> Oberon. For now I program in Turbo Pascal and since I eard that all
- RF> these languages came from Niclaus (sic, it is actually Niklaus) Wirth
- RF> I wish to have a few enlightment about difference between these languages.
-
- Since someone has already answered the Modula-2 side of the question, I will
- answer the Oberon side.
-
- Oberon (named for the moon of Uranus) was developed by N. Wirth and J.
- Gutknecth of ETH. The design goal was one of simplicty, and that is
- reflected in the language and the operating system.
-
- Oberon removes all of the extraneous features of Modula-2, cleans up the
- language, and adds a few new features to allow for more type checked variant
- records (and object oriented programming style).
-
- Each of these things will be tackled briefly (after all, I have to earn a
- living).
-
- 1) Removal of superfluous items:
- a) Enumerations: They do not add enough expressiveness to a program
- to warrant the added complexity in the compiler. For the most part,
- if you are using modules in a good fashion, you can use constants in
- the place of enuerations. The only drawback to this is that of
- type-checking.
- b) Nested modules: Discovered to be hardly used, and thus removed c)
- generic SET OF: Since there is no enumeration, what are you to make a
- set from? The SET type is now equivalent to the M-2 BITSET. It is of
- an implementation dependant size (usually at least 32 bits). d) FOR
- statement removed in Oberon. It is reinstated in Oberon-2.
- e) DEFINITION & IMPLEMENTATION merged. Exported identifiers are
- marked with a *. Read-only exported variables are marked with a -.
- Let us hope they make a read-only VAR parameter, which would be
- useful for exported procedures that take a VAR parm for efficiency.
- The programmer using the procedure would be guaranteed that the
- parameter is not modified!
-
- Some other items have also been removed, but these are the biggies.
-
- 2) Cleans up the language
- a) concept of mathematical inclusion. SHORTINT (subset of) INTEGER
- (subset of) LONGINT (subset of) REAL (subset of) LONGREAL. Thus, you
- can assign any smaller type to any larger type without an error. The
- SHORT and LONG procedures allow you to convert from a longer type to
- a shorter type, and the ENTIER allows a real to integer conversion.
- b) All language constructs still fully bracketed. No dangling ELSE a
- la Pascal.
- c) If a statement does not match any item in a CASE or WITH, _and_ no
- ELSE cluase is specified, the program will abort. (Not a language
- clean up, but it is clearly specified)
-
- 3) New items
- a) Type extension, testing, guard
- b) New form of WITH
- c) FOR construct reintroduced
- d) Type-bound procedures (Oberon-2) (also called methods or member
- functions)
-
- You can obtain an implementation of Oberon for the RS6000, SPARCstation,
- DEC3100, MacII or MSDOS (requires 386) from neptune.ethz.ch
- (129.132.101.33). You can also get the Oberon documentation (langauge
- definition, et al) from this site. Check out the subdirectory /Oberon
-
-
- Taylor Hutt (thutt@mail.casi.nasa.gov)
- Championing worldwide usage of Oberon-2!
-